@ngrr/ds 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,331 @@
1
+ (function(le,_){typeof exports=="object"&&typeof module<"u"?_(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],_):(le=typeof globalThis<"u"?globalThis:le||self,_(le.DSNagarro={},le.React,le.ReactDOM))})(this,function(le,_,xn){"use strict";var o7=Object.defineProperty;var l7=(le,_,xn)=>_ in le?o7(le,_,{enumerable:!0,configurable:!0,writable:!0,value:xn}):le[_]=xn;var ee=(le,_,xn)=>l7(le,typeof _!="symbol"?_+"":_,xn);function tC(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const $a=tC(_);var Pa=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function qs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var i=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,i.get?i:{enumerable:!0,get:function(){return e[r]}})}),n}var Hd={exports:{}},Vs={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var My;function nC(){if(My)return Vs;My=1;var e=_,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function s(o,l,u){var c,d={},f=null,g=null;u!==void 0&&(f=""+u),l.key!==void 0&&(f=""+l.key),l.ref!==void 0&&(g=l.ref);for(c in l)r.call(l,c)&&!a.hasOwnProperty(c)&&(d[c]=l[c]);if(o&&o.defaultProps)for(c in l=o.defaultProps,l)d[c]===void 0&&(d[c]=l[c]);return{$$typeof:t,type:o,key:f,ref:g,props:d,_owner:i.current}}return Vs.Fragment=n,Vs.jsx=s,Vs.jsxs=s,Vs}var Ks={};/**
10
+ * @license React
11
+ * react-jsx-runtime.development.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var jy;function rC(){return jy||(jy=1,process.env.NODE_ENV!=="production"&&function(){var e=_,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),p=Symbol.iterator,m="@@iterator";function v(L){if(L===null||typeof L!="object")return null;var oe=p&&L[p]||L[m];return typeof oe=="function"?oe:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(L){{for(var oe=arguments.length,he=new Array(oe>1?oe-1:0),ke=1;ke<oe;ke++)he[ke-1]=arguments[ke];b("error",L,he)}}function b(L,oe,he){{var ke=x.ReactDebugCurrentFrame,Fe=ke.getStackAddendum();Fe!==""&&(oe+="%s",he=he.concat([Fe]));var Ke=he.map(function(De){return String(De)});Ke.unshift("Warning: "+oe),Function.prototype.apply.call(console[L],console,Ke)}}var k=!1,w=!1,S=!1,N=!1,E=!1,T;T=Symbol.for("react.module.reference");function C(L){return!!(typeof L=="string"||typeof L=="function"||L===r||L===a||E||L===i||L===u||L===c||N||L===g||k||w||S||typeof L=="object"&&L!==null&&(L.$$typeof===f||L.$$typeof===d||L.$$typeof===s||L.$$typeof===o||L.$$typeof===l||L.$$typeof===T||L.getModuleId!==void 0))}function O(L,oe,he){var ke=L.displayName;if(ke)return ke;var Fe=oe.displayName||oe.name||"";return Fe!==""?he+"("+Fe+")":he}function $(L){return L.displayName||"Context"}function M(L){if(L==null)return null;if(typeof L.tag=="number"&&y("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof L=="function")return L.displayName||L.name||null;if(typeof L=="string")return L;switch(L){case r:return"Fragment";case n:return"Portal";case a:return"Profiler";case i:return"StrictMode";case u:return"Suspense";case c:return"SuspenseList"}if(typeof L=="object")switch(L.$$typeof){case o:var oe=L;return $(oe)+".Consumer";case s:var he=L;return $(he._context)+".Provider";case l:return O(L,L.render,"ForwardRef");case d:var ke=L.displayName||null;return ke!==null?ke:M(L.type)||"Memo";case f:{var Fe=L,Ke=Fe._payload,De=Fe._init;try{return M(De(Ke))}catch{return null}}}return null}var j=Object.assign,P=0,F,B,W,q,D,A,U;function Y(){}Y.__reactDisabledLog=!0;function G(){{if(P===0){F=console.log,B=console.info,W=console.warn,q=console.error,D=console.group,A=console.groupCollapsed,U=console.groupEnd;var L={configurable:!0,enumerable:!0,value:Y,writable:!0};Object.defineProperties(console,{info:L,log:L,warn:L,error:L,group:L,groupCollapsed:L,groupEnd:L})}P++}}function J(){{if(P--,P===0){var L={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},L,{value:F}),info:j({},L,{value:B}),warn:j({},L,{value:W}),error:j({},L,{value:q}),group:j({},L,{value:D}),groupCollapsed:j({},L,{value:A}),groupEnd:j({},L,{value:U})})}P<0&&y("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var R=x.ReactCurrentDispatcher,K;function Z(L,oe,he){{if(K===void 0)try{throw Error()}catch(Fe){var ke=Fe.stack.trim().match(/\n( *(at )?)/);K=ke&&ke[1]||""}return`
18
+ `+K+L}}var z=!1,X;{var H=typeof WeakMap=="function"?WeakMap:Map;X=new H}function I(L,oe){if(!L||z)return"";{var he=X.get(L);if(he!==void 0)return he}var ke;z=!0;var Fe=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Ke;Ke=R.current,R.current=null,G();try{if(oe){var De=function(){throw Error()};if(Object.defineProperty(De.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(De,[])}catch(ut){ke=ut}Reflect.construct(L,[],De)}else{try{De.call()}catch(ut){ke=ut}L.call(De.prototype)}}else{try{throw Error()}catch(ut){ke=ut}L()}}catch(ut){if(ut&&ke&&typeof ut.stack=="string"){for(var Ae=ut.stack.split(`
19
+ `),qt=ke.stack.split(`
20
+ `),dt=Ae.length-1,ft=qt.length-1;dt>=1&&ft>=0&&Ae[dt]!==qt[ft];)ft--;for(;dt>=1&&ft>=0;dt--,ft--)if(Ae[dt]!==qt[ft]){if(dt!==1||ft!==1)do if(dt--,ft--,ft<0||Ae[dt]!==qt[ft]){var Xe=`
21
+ `+Ae[dt].replace(" at new "," at ");return L.displayName&&Xe.includes("<anonymous>")&&(Xe=Xe.replace("<anonymous>",L.displayName)),typeof L=="function"&&X.set(L,Xe),Xe}while(dt>=1&&ft>=0);break}}}finally{z=!1,R.current=Ke,J(),Error.prepareStackTrace=Fe}var Vt=L?L.displayName||L.name:"",Lr=Vt?Z(Vt):"";return typeof L=="function"&&X.set(L,Lr),Lr}function ne(L,oe,he){return I(L,!1)}function ue(L){var oe=L.prototype;return!!(oe&&oe.isReactComponent)}function ye(L,oe,he){if(L==null)return"";if(typeof L=="function")return I(L,ue(L));if(typeof L=="string")return Z(L);switch(L){case u:return Z("Suspense");case c:return Z("SuspenseList")}if(typeof L=="object")switch(L.$$typeof){case l:return ne(L.render);case d:return ye(L.type,oe,he);case f:{var ke=L,Fe=ke._payload,Ke=ke._init;try{return ye(Ke(Fe),oe,he)}catch{}}}return""}var fe=Object.prototype.hasOwnProperty,xe={},Se=x.ReactDebugCurrentFrame;function We(L){if(L){var oe=L._owner,he=ye(L.type,L._source,oe?oe.type:null);Se.setExtraStackFrame(he)}else Se.setExtraStackFrame(null)}function Ze(L,oe,he,ke,Fe){{var Ke=Function.call.bind(fe);for(var De in L)if(Ke(L,De)){var Ae=void 0;try{if(typeof L[De]!="function"){var qt=Error((ke||"React class")+": "+he+" type `"+De+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof L[De]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw qt.name="Invariant Violation",qt}Ae=L[De](oe,De,ke,he,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(dt){Ae=dt}Ae&&!(Ae instanceof Error)&&(We(Fe),y("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ke||"React class",he,De,typeof Ae),We(null)),Ae instanceof Error&&!(Ae.message in xe)&&(xe[Ae.message]=!0,We(Fe),y("Failed %s type: %s",he,Ae.message),We(null))}}}var Nt=Array.isArray;function Ve(L){return Nt(L)}function Qe(L){{var oe=typeof Symbol=="function"&&Symbol.toStringTag,he=oe&&L[Symbol.toStringTag]||L.constructor.name||"Object";return he}}function mt(L){try{return ht(L),!1}catch{return!0}}function ht(L){return""+L}function vt(L){if(mt(L))return y("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Qe(L)),ht(L)}var Le=x.ReactCurrentOwner,Et={key:!0,ref:!0,__self:!0,__source:!0},Tt,at;function fr(L){if(fe.call(L,"ref")){var oe=Object.getOwnPropertyDescriptor(L,"ref").get;if(oe&&oe.isReactWarning)return!1}return L.ref!==void 0}function Mn(L){if(fe.call(L,"key")){var oe=Object.getOwnPropertyDescriptor(L,"key").get;if(oe&&oe.isReactWarning)return!1}return L.key!==void 0}function Ut(L,oe){typeof L.ref=="string"&&Le.current}function me(L,oe){{var he=function(){Tt||(Tt=!0,y("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",oe))};he.isReactWarning=!0,Object.defineProperty(L,"key",{get:he,configurable:!0})}}function Ie(L,oe){{var he=function(){at||(at=!0,y("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",oe))};he.isReactWarning=!0,Object.defineProperty(L,"ref",{get:he,configurable:!0})}}var Ct=function(L,oe,he,ke,Fe,Ke,De){var Ae={$$typeof:t,type:L,key:oe,ref:he,props:De,_owner:Ke};return Ae._store={},Object.defineProperty(Ae._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(Ae,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ke}),Object.defineProperty(Ae,"_source",{configurable:!1,enumerable:!1,writable:!1,value:Fe}),Object.freeze&&(Object.freeze(Ae.props),Object.freeze(Ae)),Ae};function bt(L,oe,he,ke,Fe){{var Ke,De={},Ae=null,qt=null;he!==void 0&&(vt(he),Ae=""+he),Mn(oe)&&(vt(oe.key),Ae=""+oe.key),fr(oe)&&(qt=oe.ref,Ut(oe,Fe));for(Ke in oe)fe.call(oe,Ke)&&!Et.hasOwnProperty(Ke)&&(De[Ke]=oe[Ke]);if(L&&L.defaultProps){var dt=L.defaultProps;for(Ke in dt)De[Ke]===void 0&&(De[Ke]=dt[Ke])}if(Ae||qt){var ft=typeof L=="function"?L.displayName||L.name||"Unknown":L;Ae&&me(De,ft),qt&&Ie(De,ft)}return Ct(L,Ae,qt,Fe,ke,Le.current,De)}}var re=x.ReactCurrentOwner,ve=x.ReactDebugCurrentFrame;function ge(L){if(L){var oe=L._owner,he=ye(L.type,L._source,oe?oe.type:null);ve.setExtraStackFrame(he)}else ve.setExtraStackFrame(null)}var Ne;Ne=!1;function pt(L){return typeof L=="object"&&L!==null&&L.$$typeof===t}function Mt(){{if(re.current){var L=M(re.current.type);if(L)return`
22
+
23
+ Check the render method of \``+L+"`."}return""}}function un(L){return""}var Oa={};function jt(L){{var oe=Mt();if(!oe){var he=typeof L=="string"?L:L.displayName||L.name;he&&(oe=`
24
+
25
+ Check the top-level render call using <`+he+">.")}return oe}}function st(L,oe){{if(!L._store||L._store.validated||L.key!=null)return;L._store.validated=!0;var he=jt(oe);if(Oa[he])return;Oa[he]=!0;var ke="";L&&L._owner&&L._owner!==re.current&&(ke=" It was passed a child from "+M(L._owner.type)+"."),ge(L),y('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',he,ke),ge(null)}}function Jt(L,oe){{if(typeof L!="object")return;if(Ve(L))for(var he=0;he<L.length;he++){var ke=L[he];pt(ke)&&st(ke,oe)}else if(pt(L))L._store&&(L._store.validated=!0);else if(L){var Fe=v(L);if(typeof Fe=="function"&&Fe!==L.entries)for(var Ke=Fe.call(L),De;!(De=Ke.next()).done;)pt(De.value)&&st(De.value,oe)}}}function jn(L){{var oe=L.type;if(oe==null||typeof oe=="string")return;var he;if(typeof oe=="function")he=oe.propTypes;else if(typeof oe=="object"&&(oe.$$typeof===l||oe.$$typeof===d))he=oe.propTypes;else return;if(he){var ke=M(oe);Ze(he,L.props,"prop",ke,L)}else if(oe.PropTypes!==void 0&&!Ne){Ne=!0;var Fe=M(oe);y("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",Fe||"Unknown")}typeof oe.getDefaultProps=="function"&&!oe.getDefaultProps.isReactClassApproved&&y("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Yn(L){{for(var oe=Object.keys(L.props),he=0;he<oe.length;he++){var ke=oe[he];if(ke!=="children"&&ke!=="key"){ge(L),y("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ke),ge(null);break}}L.ref!==null&&(ge(L),y("Invalid attribute `ref` supplied to `React.Fragment`."),ge(null))}}var Ht={};function hr(L,oe,he,ke,Fe,Ke){{var De=C(L);if(!De){var Ae="";(L===void 0||typeof L=="object"&&L!==null&&Object.keys(L).length===0)&&(Ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var qt=un();qt?Ae+=qt:Ae+=Mt();var dt;L===null?dt="null":Ve(L)?dt="array":L!==void 0&&L.$$typeof===t?(dt="<"+(M(L.type)||"Unknown")+" />",Ae=" Did you accidentally export a JSX literal instead of a component?"):dt=typeof L,y("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",dt,Ae)}var ft=bt(L,oe,he,Fe,Ke);if(ft==null)return ft;if(De){var Xe=oe.children;if(Xe!==void 0)if(ke)if(Ve(Xe)){for(var Vt=0;Vt<Xe.length;Vt++)Jt(Xe[Vt],L);Object.freeze&&Object.freeze(Xe)}else y("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Jt(Xe,L)}if(fe.call(oe,"key")){var Lr=M(L),ut=Object.keys(oe).filter(function(s7){return s7!=="key"}),Cy=ut.length>0?"{key: someKey, "+ut.join(": ..., ")+": ...}":"{key: someKey}";if(!Ht[Lr+Cy]){var a7=ut.length>0?"{"+ut.join(": ..., ")+": ...}":"{}";y(`A props object containing a "key" prop is being spread into JSX:
26
+ let props = %s;
27
+ <%s {...props} />
28
+ React keys must be passed directly to JSX without using spread:
29
+ let props = %s;
30
+ <%s key={someKey} {...props} />`,Cy,Lr,a7,Lr),Ht[Lr+Cy]=!0}}return L===r?Yn(ft):jn(ft),ft}}function te(L,oe,he){return hr(L,oe,he,!0)}function Ge(L,oe,he){return hr(L,oe,he,!1)}var ot=Ge,pr=te;Ks.Fragment=r,Ks.jsx=ot,Ks.jsxs=pr}()),Ks}process.env.NODE_ENV==="production"?Hd.exports=nC():Hd.exports=rC();var h=Hd.exports;function qd({label:e="⌘ ↵","aria-label":t,contentColor:n="default",className:r}){return h.jsx("span",{className:`dsn-shortcut${r?` ${r}`:""}`,"aria-label":t,role:"img",children:h.jsx("kbd",{className:"dsn-shortcut-content","data-color":n,"aria-hidden":"true",children:e})})}function we({variant:e="primary",size:t="md",disabled:n=!1,loading:r=!1,destructive:i=!1,showLeadingIcon:a=!1,leadingIcon:s,showLabel:o=!0,children:l,showTrailingIcon:u=!1,trailingIcon:c,shortcut:d=!1,shortcutLabel:f="⌘K",shortcutAriaLabel:g,type:p="button",onClick:m,"aria-label":v,"aria-haspopup":x,className:y}){const b=n||r,k=d&&!r&&!!g,w=e==="primary"?"inverted":"default";return h.jsxs("button",{type:p,className:`dsn-button${y?` ${y}`:""}`,"data-variant":e,"data-size":t,"data-destructive":i||void 0,disabled:b,"aria-busy":r||void 0,"aria-label":v,"aria-haspopup":x,onClick:m,children:[r?h.jsx("span",{className:"dsn-button-spinner","aria-hidden":"true"}):a&&s!=null&&h.jsx("span",{className:"dsn-button-icon","aria-hidden":"true",children:s}),o&&h.jsx("span",{className:"dsn-button-label",children:l}),!r&&u&&c!=null&&h.jsx("span",{className:"dsn-button-icon","aria-hidden":"true",children:c}),k&&h.jsx(qd,{label:f,"aria-label":g,contentColor:w})]})}function cn({size:e="md",variant:t="ghost",selected:n=!1,disabled:r=!1,icon:i,onClick:a,onSelectedChange:s,className:o,"aria-label":l}){return h.jsx("button",{type:"button",className:["dsn-toggle-button",o].filter(Boolean).join(" "),"data-size":e,"data-variant":t,"data-selected":n||void 0,disabled:r,"aria-label":l,"aria-pressed":n,onClick:u=>{r||(s==null||s(!n),a==null||a(u))},children:h.jsx("span",{className:"dsn-toggle-button-icon","aria-hidden":"true",children:i})})}function iC({variant:e="ghost",size:t="md",disabled:n=!1,loading:r=!1,badge:i=!1,showLabel:a=!0,icon:s,children:o,"aria-label":l,onClick:u,className:c}){return h.jsxs("button",{type:"button",className:`dsn-vertical-button${c?` ${c}`:""}`,"data-variant":e,"data-size":t,"data-loading":r||void 0,disabled:n,"aria-label":l,"aria-busy":r||void 0,onClick:u,children:[h.jsxs("span",{className:"dsn-vertical-button__icon-area",children:[r?h.jsx("span",{className:"dsn-vertical-button__spinner","aria-hidden":"true"}):s!=null&&h.jsx("span",{className:"dsn-vertical-button__icon","aria-hidden":"true",children:s}),i&&h.jsx("span",{className:"dsn-vertical-button__badge","aria-hidden":"true"})]}),a&&o!=null&&h.jsx("span",{className:"dsn-vertical-button__label",children:o})]})}function Fi({size:e="md",spaceBetween:t=!1,children:n,className:r,"aria-label":i="Button group"}){const a=["dsn-button-group",r].filter(Boolean).join(" ");return h.jsx("div",{className:a,"data-size":e,"data-space-between":t||void 0,role:"group","aria-label":i,children:n})}function aC({size:e="md",spaceBetween:t=!1,children:n,className:r,"aria-label":i="Button group vertical"}){const a=["dsn-button-group-vertical",r].filter(Boolean).join(" ");return h.jsx("div",{className:a,"data-size":e,"data-space-between":t||void 0,role:"group","aria-label":i,children:n})}/**
31
+ * @license lucide-react v0.575.0 - ISC
32
+ *
33
+ * This source code is licensed under the ISC license.
34
+ * See the LICENSE file in the root directory of this source tree.
35
+ */const Oy=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
36
+ * @license lucide-react v0.575.0 - ISC
37
+ *
38
+ * This source code is licensed under the ISC license.
39
+ * See the LICENSE file in the root directory of this source tree.
40
+ */const sC=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
41
+ * @license lucide-react v0.575.0 - ISC
42
+ *
43
+ * This source code is licensed under the ISC license.
44
+ * See the LICENSE file in the root directory of this source tree.
45
+ */const oC=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
46
+ * @license lucide-react v0.575.0 - ISC
47
+ *
48
+ * This source code is licensed under the ISC license.
49
+ * See the LICENSE file in the root directory of this source tree.
50
+ */const $y=e=>{const t=oC(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
51
+ * @license lucide-react v0.575.0 - ISC
52
+ *
53
+ * This source code is licensed under the ISC license.
54
+ * See the LICENSE file in the root directory of this source tree.
55
+ */var lC={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
56
+ * @license lucide-react v0.575.0 - ISC
57
+ *
58
+ * This source code is licensed under the ISC license.
59
+ * See the LICENSE file in the root directory of this source tree.
60
+ */const uC=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
61
+ * @license lucide-react v0.575.0 - ISC
62
+ *
63
+ * This source code is licensed under the ISC license.
64
+ * See the LICENSE file in the root directory of this source tree.
65
+ */const cC=_.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:a,iconNode:s,...o},l)=>_.createElement("svg",{ref:l,...lC,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Oy("lucide",i),...!a&&!uC(o)&&{"aria-hidden":"true"},...o},[...s.map(([u,c])=>_.createElement(u,c)),...Array.isArray(a)?a:[a]]));/**
66
+ * @license lucide-react v0.575.0 - ISC
67
+ *
68
+ * This source code is licensed under the ISC license.
69
+ * See the LICENSE file in the root directory of this source tree.
70
+ */const Me=(e,t)=>{const n=_.forwardRef(({className:r,...i},a)=>_.createElement(cC,{ref:a,iconNode:t,className:Oy(`lucide-${sC($y(e))}`,`lucide-${e}`,r),...i}));return n.displayName=$y(e),n};/**
71
+ * @license lucide-react v0.575.0 - ISC
72
+ *
73
+ * This source code is licensed under the ISC license.
74
+ * See the LICENSE file in the root directory of this source tree.
75
+ */const Py=Me("arrow-left",[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]]);/**
76
+ * @license lucide-react v0.575.0 - ISC
77
+ *
78
+ * This source code is licensed under the ISC license.
79
+ * See the LICENSE file in the root directory of this source tree.
80
+ */const dC=Me("arrow-right",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);/**
81
+ * @license lucide-react v0.575.0 - ISC
82
+ *
83
+ * This source code is licensed under the ISC license.
84
+ * See the LICENSE file in the root directory of this source tree.
85
+ */const fC=Me("bold",[["path",{d:"M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8",key:"mg9rjx"}]]);/**
86
+ * @license lucide-react v0.575.0 - ISC
87
+ *
88
+ * This source code is licensed under the ISC license.
89
+ * See the LICENSE file in the root directory of this source tree.
90
+ */const hC=Me("building-2",[["path",{d:"M10 12h4",key:"a56b0p"}],["path",{d:"M10 8h4",key:"1sr2af"}],["path",{d:"M14 21v-3a2 2 0 0 0-4 0v3",key:"1rgiei"}],["path",{d:"M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2",key:"secmi2"}],["path",{d:"M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16",key:"16ra0t"}]]);/**
91
+ * @license lucide-react v0.575.0 - ISC
92
+ *
93
+ * This source code is licensed under the ISC license.
94
+ * See the LICENSE file in the root directory of this source tree.
95
+ */const Ay=Me("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
96
+ * @license lucide-react v0.575.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */const zi=Me("chevron-down",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
101
+ * @license lucide-react v0.575.0 - ISC
102
+ *
103
+ * This source code is licensed under the ISC license.
104
+ * See the LICENSE file in the root directory of this source tree.
105
+ */const pC=Me("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
106
+ * @license lucide-react v0.575.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */const Aa=Me("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
111
+ * @license lucide-react v0.575.0 - ISC
112
+ *
113
+ * This source code is licensed under the ISC license.
114
+ * See the LICENSE file in the root directory of this source tree.
115
+ */const gC=Me("chevrons-up-down",[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]]);/**
116
+ * @license lucide-react v0.575.0 - ISC
117
+ *
118
+ * This source code is licensed under the ISC license.
119
+ * See the LICENSE file in the root directory of this source tree.
120
+ */const Vd=Me("circle-x",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/**
121
+ * @license lucide-react v0.575.0 - ISC
122
+ *
123
+ * This source code is licensed under the ISC license.
124
+ * See the LICENSE file in the root directory of this source tree.
125
+ */const mC=Me("code-xml",[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]]);/**
126
+ * @license lucide-react v0.575.0 - ISC
127
+ *
128
+ * This source code is licensed under the ISC license.
129
+ * See the LICENSE file in the root directory of this source tree.
130
+ */const vC=Me("diamond",[["path",{d:"M2.7 10.3a2.41 2.41 0 0 0 0 3.41l7.59 7.59a2.41 2.41 0 0 0 3.41 0l7.59-7.59a2.41 2.41 0 0 0 0-3.41l-7.59-7.59a2.41 2.41 0 0 0-3.41 0Z",key:"1f1r0c"}]]);/**
131
+ * @license lucide-react v0.575.0 - ISC
132
+ *
133
+ * This source code is licensed under the ISC license.
134
+ * See the LICENSE file in the root directory of this source tree.
135
+ */const Ly=Me("download",[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]]);/**
136
+ * @license lucide-react v0.575.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */const Dy=Me("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);/**
141
+ * @license lucide-react v0.575.0 - ISC
142
+ *
143
+ * This source code is licensed under the ISC license.
144
+ * See the LICENSE file in the root directory of this source tree.
145
+ */const yC=Me("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
146
+ * @license lucide-react v0.575.0 - ISC
147
+ *
148
+ * This source code is licensed under the ISC license.
149
+ * See the LICENSE file in the root directory of this source tree.
150
+ */const xC=Me("eraser",[["path",{d:"M21 21H8a2 2 0 0 1-1.42-.587l-3.994-3.999a2 2 0 0 1 0-2.828l10-10a2 2 0 0 1 2.829 0l5.999 6a2 2 0 0 1 0 2.828L12.834 21",key:"g5wo59"}],["path",{d:"m5.082 11.09 8.828 8.828",key:"1wx5vj"}]]);/**
151
+ * @license lucide-react v0.575.0 - ISC
152
+ *
153
+ * This source code is licensed under the ISC license.
154
+ * See the LICENSE file in the root directory of this source tree.
155
+ */const Iy=Me("file",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]]);/**
156
+ * @license lucide-react v0.575.0 - ISC
157
+ *
158
+ * This source code is licensed under the ISC license.
159
+ * See the LICENSE file in the root directory of this source tree.
160
+ */const Kd=Me("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/**
161
+ * @license lucide-react v0.575.0 - ISC
162
+ *
163
+ * This source code is licensed under the ISC license.
164
+ * See the LICENSE file in the root directory of this source tree.
165
+ */const bC=Me("italic",[["line",{x1:"19",x2:"10",y1:"4",y2:"4",key:"15jd3p"}],["line",{x1:"14",x2:"5",y1:"20",y2:"20",key:"bu0au3"}],["line",{x1:"15",x2:"9",y1:"4",y2:"20",key:"uljnxc"}]]);/**
166
+ * @license lucide-react v0.575.0 - ISC
167
+ *
168
+ * This source code is licensed under the ISC license.
169
+ * See the LICENSE file in the root directory of this source tree.
170
+ */const Fy=Me("link-2",[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]);/**
171
+ * @license lucide-react v0.575.0 - ISC
172
+ *
173
+ * This source code is licensed under the ISC license.
174
+ * See the LICENSE file in the root directory of this source tree.
175
+ */const _C=Me("list-ordered",[["path",{d:"M11 5h10",key:"1cz7ny"}],["path",{d:"M11 12h10",key:"1438ji"}],["path",{d:"M11 19h10",key:"11t30w"}],["path",{d:"M4 4h1v5",key:"10yrso"}],["path",{d:"M4 9h2",key:"r1h2o0"}],["path",{d:"M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02",key:"xtkcd5"}]]);/**
176
+ * @license lucide-react v0.575.0 - ISC
177
+ *
178
+ * This source code is licensed under the ISC license.
179
+ * See the LICENSE file in the root directory of this source tree.
180
+ */const wC=Me("list",[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]]);/**
181
+ * @license lucide-react v0.575.0 - ISC
182
+ *
183
+ * This source code is licensed under the ISC license.
184
+ * See the LICENSE file in the root directory of this source tree.
185
+ */const kC=Me("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/**
186
+ * @license lucide-react v0.575.0 - ISC
187
+ *
188
+ * This source code is licensed under the ISC license.
189
+ * See the LICENSE file in the root directory of this source tree.
190
+ */const SC=Me("paperclip",[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]);/**
191
+ * @license lucide-react v0.575.0 - ISC
192
+ *
193
+ * This source code is licensed under the ISC license.
194
+ * See the LICENSE file in the root directory of this source tree.
195
+ */const NC=Me("pencil",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]);/**
196
+ * @license lucide-react v0.575.0 - ISC
197
+ *
198
+ * This source code is licensed under the ISC license.
199
+ * See the LICENSE file in the root directory of this source tree.
200
+ */const EC=Me("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
201
+ * @license lucide-react v0.575.0 - ISC
202
+ *
203
+ * This source code is licensed under the ISC license.
204
+ * See the LICENSE file in the root directory of this source tree.
205
+ */const TC=Me("quote",[["path",{d:"M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"rib7q0"}],["path",{d:"M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z",key:"1ymkrd"}]]);/**
206
+ * @license lucide-react v0.575.0 - ISC
207
+ *
208
+ * This source code is licensed under the ISC license.
209
+ * See the LICENSE file in the root directory of this source tree.
210
+ */const CC=Me("redo-2",[["path",{d:"m15 14 5-5-5-5",key:"12vg1m"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",key:"6uklza"}]]);/**
211
+ * @license lucide-react v0.575.0 - ISC
212
+ *
213
+ * This source code is licensed under the ISC license.
214
+ * See the LICENSE file in the root directory of this source tree.
215
+ */const MC=Me("smile",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M8 14s1.5 2 4 2 4-2 4-2",key:"1y1vjs"}],["line",{x1:"9",x2:"9.01",y1:"9",y2:"9",key:"yxxnd0"}],["line",{x1:"15",x2:"15.01",y1:"9",y2:"9",key:"1p4y9e"}]]);/**
216
+ * @license lucide-react v0.575.0 - ISC
217
+ *
218
+ * This source code is licensed under the ISC license.
219
+ * See the LICENSE file in the root directory of this source tree.
220
+ */const jC=Me("strikethrough",[["path",{d:"M16 4H9a3 3 0 0 0-2.83 4",key:"43sutm"}],["path",{d:"M14 12a4 4 0 0 1 0 8H6",key:"nlfj13"}],["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}]]);/**
221
+ * @license lucide-react v0.575.0 - ISC
222
+ *
223
+ * This source code is licensed under the ISC license.
224
+ * See the LICENSE file in the root directory of this source tree.
225
+ */const OC=Me("text-align-center",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M17 12H7",key:"16if0g"}],["path",{d:"M19 19H5",key:"vjpgq2"}]]);/**
226
+ * @license lucide-react v0.575.0 - ISC
227
+ *
228
+ * This source code is licensed under the ISC license.
229
+ * See the LICENSE file in the root directory of this source tree.
230
+ */const $C=Me("text-align-end",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M21 12H9",key:"dn1m92"}],["path",{d:"M21 19H7",key:"4cu937"}]]);/**
231
+ * @license lucide-react v0.575.0 - ISC
232
+ *
233
+ * This source code is licensed under the ISC license.
234
+ * See the LICENSE file in the root directory of this source tree.
235
+ */const PC=Me("text-align-justify",[["path",{d:"M3 5h18",key:"1u36vt"}],["path",{d:"M3 12h18",key:"1i2n21"}],["path",{d:"M3 19h18",key:"awlh7x"}]]);/**
236
+ * @license lucide-react v0.575.0 - ISC
237
+ *
238
+ * This source code is licensed under the ISC license.
239
+ * See the LICENSE file in the root directory of this source tree.
240
+ */const AC=Me("text-align-start",[["path",{d:"M21 5H3",key:"1fi0y6"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M17 19H3",key:"z6ezky"}]]);/**
241
+ * @license lucide-react v0.575.0 - ISC
242
+ *
243
+ * This source code is licensed under the ISC license.
244
+ * See the LICENSE file in the root directory of this source tree.
245
+ */const zy=Me("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/**
246
+ * @license lucide-react v0.575.0 - ISC
247
+ *
248
+ * This source code is licensed under the ISC license.
249
+ * See the LICENSE file in the root directory of this source tree.
250
+ */const LC=Me("underline",[["path",{d:"M6 4v6a6 6 0 0 0 12 0V4",key:"9kb039"}],["line",{x1:"4",x2:"20",y1:"20",y2:"20",key:"nun2al"}]]);/**
251
+ * @license lucide-react v0.575.0 - ISC
252
+ *
253
+ * This source code is licensed under the ISC license.
254
+ * See the LICENSE file in the root directory of this source tree.
255
+ */const DC=Me("undo-2",[["path",{d:"M9 14 4 9l5-5",key:"102s5s"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",key:"f3b9sd"}]]);/**
256
+ * @license lucide-react v0.575.0 - ISC
257
+ *
258
+ * This source code is licensed under the ISC license.
259
+ * See the LICENSE file in the root directory of this source tree.
260
+ */const IC=Me("upload",[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]);/**
261
+ * @license lucide-react v0.575.0 - ISC
262
+ *
263
+ * This source code is licensed under the ISC license.
264
+ * See the LICENSE file in the root directory of this source tree.
265
+ */const FC=Me("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/**
266
+ * @license lucide-react v0.575.0 - ISC
267
+ *
268
+ * This source code is licensed under the ISC license.
269
+ * See the LICENSE file in the root directory of this source tree.
270
+ */const Dr=Me("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);function zC({size:e="md",variant:t="secondary",children:n,leadingIcon:r,disabled:i=!1,loading:a=!1,triggerIcon:s,onMainClick:o,onDropdownClick:l,dropdownAriaLabel:u="More options",className:c}){const d=s??h.jsx(zi,{size:16,strokeWidth:1.5,"aria-hidden":"true"});return h.jsxs("div",{className:`dsn-split-button${c?` ${c}`:""}`,"data-size":e,role:"group",children:[h.jsx(we,{variant:t,size:e,showLeadingIcon:r!=null,leadingIcon:r,disabled:i,loading:a,onClick:o,children:n}),h.jsx(we,{variant:t,size:e,showLabel:!1,showLeadingIcon:!0,leadingIcon:d,disabled:i||a,"aria-label":u,"aria-haspopup":"true",onClick:l})]})}function Ri({size:e="md",variant:t="profile",fill:n="initials",src:r,initials:i,icon:a,name:s,alt:o,className:l,style:u}){const c=["dsn-avatar",l].filter(Boolean).join(" "),d=s??void 0,f=s?void 0:!0,g=i?i.trim().slice(0,2).toUpperCase():void 0;return h.jsxs("div",{className:c,"data-size":e,"data-variant":t,"data-fill":n,role:"img","aria-label":d,"aria-hidden":f,style:u,children:[n==="picture"&&r&&h.jsx("img",{className:"dsn-avatar-image",src:r,alt:o??s??""}),n==="initials"&&g,n==="icon"&&h.jsx("span",{className:"dsn-avatar-icon","aria-hidden":"true",children:(()=>{const p=a??(t==="organization"?hC:FC);return h.jsx(p,{"aria-hidden":"true"})})()})]})}function RC({size:e="sm",avatars:t,maxVisible:n=5,className:r,"aria-label":i}){const a=t.slice(0,n),s=t.length-a.length,o=i??(()=>{const u=t.map(d=>d.name);return u.length<=n?u.join(", "):`${u.slice(0,n).join(", ")}, and ${s} ${s===1?"other":"others"}`})(),l=["dsn-avatar-group",r].filter(Boolean).join(" ");return h.jsxs("div",{className:l,"data-size":e,role:"group","aria-label":o,children:[a.map((u,c)=>h.jsx(Ri,{size:e,variant:u.variant??"profile",fill:u.fill??(u.src?"picture":u.initials?"initials":"icon"),src:u.src,initials:u.initials,name:u.name,style:{zIndex:c+1}},c)),s>0&&h.jsxs("span",{className:"dsn-avatar-group-overflow","aria-hidden":"true",style:{zIndex:a.length+1},children:["+",s]})]})}function Ys({size:e="sm",variant:t="highlight-soft",count:n,className:r,"aria-label":i}){const a=e==="dot",s=a?void 0:n!==void 0?n>99?"99+":String(n):void 0,o=["dsn-badge",r].filter(Boolean).join(" ");return h.jsx("span",{className:o,"data-size":e,"data-variant":t,"aria-label":i,"aria-hidden":a&&!i?!0:void 0,children:s})}function BC({title:e,value:t,variant:n="default",className:r,"aria-label":i}){const a=["dsn-stat",r].filter(Boolean).join(" ");return h.jsxs("div",{className:a,"data-variant":n,"aria-label":i,children:[h.jsx("p",{className:"dsn-stat-title",children:e}),h.jsx("p",{className:"dsn-stat-value",children:t})]})}function Ir({label:e,variant:t="neutral",size:n="md",icon:r,showIcon:i=!0,className:a,"aria-label":s}){const o=["dsn-tag",a].filter(Boolean).join(" ");return h.jsxs("span",{className:o,"data-variant":t,"data-size":n,role:"status","aria-label":s,children:[i&&h.jsx("span",{className:"dsn-tag-icon","aria-hidden":"true","data-icon":r?"custom":void 0,children:r&&(()=>{const l=r;return h.jsx(l,{size:12,"aria-hidden":"true"})})()}),h.jsx("span",{className:"dsn-tag-label",children:e})]})}function Gs({label:e,selected:t=!1,disabled:n=!1,size:r="md",leadingIcon:i,trailingIcon:a,showLeadingIcon:s=!0,showTrailingIcon:o=!0,onDismiss:l,onClick:u,className:c,"aria-label":d}){const f=["dsn-chip",c].filter(Boolean).join(" ");function g(p){(p.key===" "||p.key==="Enter")&&!n&&(p.preventDefault(),u==null||u())}return h.jsxs("div",{role:"checkbox","aria-checked":t,"aria-disabled":n?!0:void 0,tabIndex:n?-1:0,className:f,"data-size":r,"data-selected":t,onClick:n?void 0:u,onKeyDown:g,"aria-label":d,children:[s&&h.jsx("span",{className:"dsn-chip-leading","aria-hidden":"true","data-icon":i?"custom":void 0,children:i&&(()=>{const p=i;return h.jsx(p,{size:12,"aria-hidden":"true"})})()}),h.jsx("span",{className:"dsn-chip-label",children:e}),l?h.jsx("button",{type:"button",className:"dsn-chip-dismiss","aria-label":`Remove ${e}`,tabIndex:n?-1:0,onClick:p=>{p.stopPropagation(),n||l()},children:h.jsx(Dr,{size:12,"aria-hidden":"true"})}):o?h.jsx("span",{className:"dsn-chip-trailing","aria-hidden":"true","data-icon":a?"custom":void 0,children:a&&(()=>{const p=a;return h.jsx(p,{size:12,"aria-hidden":"true"})})()}):null]})}function Xl({label:e,children:t,className:n}){const r=["dsn-chip-group",n].filter(Boolean).join(" ");return h.jsx("div",{role:"group","aria-label":e,className:r,children:t})}const WC="https://images.unsplash.com/photo-1541701494587-cb58502866ab?auto=format&fit=crop&w=512&q=80";function UC(e){switch(e){case"xxSmall":return 12;case"xSmall":case"small":case"medium":return 16;case"large":case"xLarge":return 24;case"xxLarge":return 48;default:return 16}}function Yd({variant:e="file",size:t="xxSmall",imageSrc:n,imageAlt:r="Image thumbnail",icon:i,className:a,"aria-label":s}){const o=["dsn-file-thumbnail",a].filter(Boolean).join(" "),l=UC(t),u=n??WC;return h.jsxs("span",{className:o,"data-variant":e,"data-size":t,role:"img","aria-label":s??(e==="image"?r:"File thumbnail"),children:[e==="image"?h.jsx("img",{src:u,alt:"",className:"dsn-file-thumbnail-image","aria-hidden":"true"}):null,e==="file"?h.jsx("span",{className:"dsn-file-thumbnail-icon","aria-hidden":"true",children:i??h.jsx(Iy,{size:l,strokeWidth:1.75,"aria-hidden":"true"})}):null]})}function La({checked:e,onChange:t,disabled:n=!1,size:r="md",id:i,className:a,"aria-label":s,"aria-labelledby":o}){const l=["dsn-switcher",a].filter(Boolean).join(" ");function u(){t==null||t(!e)}return h.jsx("button",{type:"button",role:"switch",id:i,"aria-checked":e,"aria-disabled":n?!0:void 0,disabled:n,"aria-label":s,"aria-labelledby":o,className:l,"data-size":r,"data-checked":e,onClick:u,children:h.jsx("span",{className:"dsn-switcher-track","aria-hidden":"true",children:h.jsx("span",{className:"dsn-switcher-thumb"})})})}function gr({size:e=16}){return h.jsx("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M8 2 L14 8 L8 14 L2 8 Z",fill:"none",stroke:"currentColor",strokeOpacity:.85,strokeWidth:"1.5",strokeLinejoin:"round"})})}function HC(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3.5 8.5L6.5 11.5L12.5 5.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}const Bi=_.forwardRef(function({variant:t="default",destructive:n=!1,disabled:r=!1,selected:i=!1,fullWidth:a=!1,label:s="Label",description:o="Description",descriptionRight:l="Description",showLabel:u=!0,showDescription:c=!1,showDescriptionRight:d=!1,showLeadingIcon:f=!0,leadingIcon:g,showTrailingIcon:p=!0,trailingIcon:m,showAvatar:v=!1,avatarProps:x,shortcut:y=!1,shortcutLabel:b="⌘ ↵",shortcutAriaLabel:k="Command Enter",showBadge:w=!1,badgeCount:S=1,badgeSize:N="sm",badgeVariant:E="critical",showTag:T=!1,tagLabel:C="Label",tagVariant:O="highlight",showButtons:$=!1,actionAriaLabel:M="Open actions",onActionClick:j,switcherChecked:P,onSwitcherChange:F,onClick:B,onKeyDown:W,tabIndex:q,className:D,"aria-label":A},U){const Y=["dsn-menu-cell",a&&"dsn-menu-cell--full-width",D].filter(Boolean).join(" "),G=t==="switcher",J=P??i,K=!($||G),Z=H=>{W==null||W(H),H.target===H.currentTarget&&(r||!B||(H.key==="Enter"||H.key===" ")&&(H.preventDefault(),B(H)))},z={className:Y,"data-variant":t,"data-destructive":n||void 0,"data-selected":i||void 0,"data-disabled":r||void 0,role:"menuitem","aria-label":A,"aria-disabled":r||void 0},X=h.jsxs(h.Fragment,{children:[v&&h.jsx("span",{className:"dsn-menu-cell-avatar-wrap",children:h.jsx(Ri,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...x})}),!v&&f&&h.jsx("span",{className:"dsn-menu-cell-icon-wrap","aria-hidden":"true",children:g??h.jsx(gr,{})}),u&&h.jsxs("span",{className:"dsn-menu-cell-label-wrap",children:[h.jsx("span",{className:"dsn-menu-cell-label",children:s}),c&&h.jsx("span",{className:"dsn-menu-cell-description",children:o})]}),d&&h.jsx("span",{className:"dsn-menu-cell-description-right",children:l}),w&&h.jsx("span",{className:"dsn-menu-cell-badge-wrap",children:h.jsx(Ys,{size:N,variant:E,count:S})}),T&&h.jsx("span",{className:"dsn-menu-cell-tag-wrap",children:h.jsx(Ir,{size:"sm",variant:O,label:C})}),p&&h.jsx("span",{className:"dsn-menu-cell-icon-wrap","aria-hidden":"true",children:i&&!G?h.jsx(HC,{}):m??h.jsx(gr,{})}),y&&h.jsx("span",{className:"dsn-menu-cell-shortcut-wrap",children:h.jsx(qd,{label:b,"aria-label":k})}),$&&h.jsx("span",{className:"dsn-menu-cell-action-wrap",onClick:H=>H.stopPropagation(),onKeyDown:H=>H.stopPropagation(),children:h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(gr,{}),"aria-label":M,onClick:H=>{H.stopPropagation(),j==null||j(H)}})}),G&&h.jsx("span",{className:"dsn-menu-cell-switcher-wrap",onClick:H=>H.stopPropagation(),onKeyDown:H=>H.stopPropagation(),children:h.jsx(La,{size:"sm",checked:J,disabled:r,"aria-label":"Toggle option",onChange:F})})]});return K?h.jsx("button",{type:"button",...z,ref:U,disabled:r,onClick:B,onKeyDown:W,tabIndex:q,children:X}):h.jsx("div",{...z,ref:U,tabIndex:q??(r?-1:0),onClick:r?void 0:B,onKeyDown:Z,children:X})});function Ry(e,t){if(typeof window>"u"||typeof document>"u")return t;const n=window.getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(n);return Number.isFinite(r)?r:t}function Fr({header:e,segment:t,search:n,content:r,bottomBar:i,role:a="menu",width:s,contentPadding:o="none",className:l,contentClassName:u,anchorRef:c,offset:d,viewportMargin:f,matchAnchorWidth:g=!1,minWidth:p,"aria-label":m="Popover"}){const v=_.useRef(null),[x,y]=_.useState(null),b=d??Ry("--space-tiny",4),k=f??Ry("--space-medium",16),w=p??192,S=_.useCallback(()=>{if(!(c!=null&&c.current)||!v.current)return;const C=c.current.getBoundingClientRect(),O=v.current.getBoundingClientRect(),$=O.height,M=Math.max(g?C.width:O.width,w),j=M,P=window.innerHeight-C.bottom-k,F=C.top-k,B=$+b>P&&F>=$+b,W=B?C.top-$-b:C.bottom+b,q=Math.max(k,window.innerHeight-$-k),D=Math.min(Math.max(W,k),q),A=C.left,U=Math.max(k,window.innerWidth-j-k),Y=Math.min(Math.max(A,k),U);y({top:D,left:Y,width:g?M:void 0,placement:B?"top":"bottom"})},[c,g,w,b,k]);_.useEffect(()=>{if(!(c!=null&&c.current))return;S();const C=()=>S(),O=()=>S();return window.addEventListener("resize",C),window.addEventListener("scroll",O,!0),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",O,!0)}},[c,S]),_.useEffect(()=>{if(!(c!=null&&c.current)||!v.current||typeof ResizeObserver>"u")return;const C=new ResizeObserver(()=>S());return C.observe(c.current),C.observe(v.current),()=>C.disconnect()},[c,S]);const N=["dsn-popover-wrapper",l].filter(Boolean).join(" "),E=["dsn-popover-wrapper-content-slot",u].filter(Boolean).join(" "),T=_.useMemo(()=>{const C={};return s!==void 0&&(C.width=s),C.minWidth=w,c!=null&&c.current&&x&&(C.position="fixed",C.top=x.top,C.left=x.left,x.width!==void 0&&s===void 0&&(C.width=x.width),C.zIndex=1e3),Object.keys(C).length>0?C:void 0},[c,x,w,s]);return h.jsxs("div",{ref:v,className:N,role:a,"aria-label":m,"data-content-padding":o,"data-placement":x==null?void 0:x.placement,style:T,children:[e&&h.jsx("div",{className:"dsn-popover-wrapper-header",children:e}),t&&h.jsx("div",{className:"dsn-popover-wrapper-segment",children:t}),n&&h.jsx("div",{className:"dsn-popover-wrapper-search",children:n}),h.jsx("div",{className:"dsn-popover-wrapper-content",children:h.jsx("div",{className:E,children:r})}),i&&h.jsx("div",{className:"dsn-popover-wrapper-bottom-bar",children:i})]})}const qC=[{id:"download",label:"Download",icon:h.jsx(Ly,{size:16,"aria-hidden":"true"})},{id:"rename",label:"Rename",icon:h.jsx(NC,{size:16,"aria-hidden":"true"})},{id:"details",label:"Details",icon:h.jsx(Kd,{size:16,"aria-hidden":"true"})}];function Gd({fileName:e,fileSize:t,previewVariant:n="file",previewSrc:r,size:i="md",disabled:a=!1,loading:s=!1,action:o="none",menuOptions:l=qC,onMenuSelect:u,onRemove:c,className:d,"aria-label":f}){const p=`dsn-attachment-chip-menu-${_.useId()}`,m=_.useRef(null),v=_.useRef(null),[x,y]=_.useState(!1),b=o==="more"&&!a&&!s;return _.useEffect(()=>{if(!x)return;const k=S=>{var N;(N=m.current)!=null&&N.contains(S.target)||y(!1)},w=S=>{var N;S.key==="Escape"&&(y(!1),(N=v.current)==null||N.focus())};return document.addEventListener("mousedown",k),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",w)}},[x]),h.jsxs("div",{ref:m,className:["dsn-attachment-chip",d].filter(Boolean).join(" "),"data-size":i,"data-disabled":a||void 0,"data-loading":s||void 0,role:"group","aria-label":f??e,children:[h.jsxs("div",{className:"dsn-attachment-chip-content",children:[h.jsx("span",{className:"dsn-attachment-chip-preview","aria-hidden":"true",children:s?h.jsx(kC,{size:16,className:"dsn-attachment-chip-spinner"}):h.jsx(Yd,{variant:n,imageSrc:r,size:"xSmall","aria-label":`${n} preview`})}),h.jsxs("span",{className:"dsn-attachment-chip-label-wrap",children:[h.jsx("span",{className:"dsn-attachment-chip-label",children:e}),h.jsx("span",{className:"dsn-attachment-chip-meta",children:t})]})]}),o==="remove"&&h.jsx("button",{type:"button",disabled:a||s,"aria-label":`Remove ${e}`,className:"dsn-attachment-chip-action",onClick:c,children:h.jsx(Dr,{size:16,"aria-hidden":"true"})}),o==="more"&&h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",disabled:a||s,"aria-label":`More options for ${e}`,"aria-haspopup":"menu","aria-controls":x?p:void 0,className:"dsn-attachment-chip-action",onClick:()=>{b&&y(k=>!k)},ref:v,children:h.jsx(Dy,{size:16,"aria-hidden":"true"})}),x&&b&&h.jsx(Fr,{role:"menu","aria-label":"Attachment options",contentPadding:"small",className:"dsn-attachment-chip-popover",contentClassName:"dsn-attachment-chip-menu",anchorRef:v,matchAnchorWidth:!0,content:h.jsx("div",{id:p,children:l.map(k=>h.jsx(Bi,{className:"dsn-attachment-chip-menu-item",label:k.label,showLeadingIcon:!!k.icon,leadingIcon:k.icon,showTrailingIcon:!1,disabled:k.disabled,onClick:()=>{var w;k.disabled||(u==null||u(k.id),y(!1),(w=v.current)==null||w.focus())}},k.id))})})]})]})}function VC(e){return e>=1024*1024*1024?`${Math.round(e/(1024*1024*1024)*10)/10} GB`:e>=1024*1024?`${Math.round(e/(1024*1024)*10)/10} MB`:e>=1024?`${Math.round(e/1024*10)/10} KB`:`${e} B`}function KC({id:e,label:t="Label",showLabel:n=!0,helperText:r="Help text",showHelpText:i=!0,error:a=!1,errorMessage:s="File extends size limit",disabled:o=!1,loading:l=!1,accept:u,uploadButtonLabel:c="Upload file",value:d,defaultValue:f=null,onChange:g,className:p,"aria-label":m}){const v=_.useId(),x=e??`dsn-attachment-field-${v}`,y=`${x}-helper`,b=_.useRef(null),k=d!==void 0,[w,S]=_.useState(f),N=k?d??null:w,[E,T]=_.useState(void 0);_.useEffect(()=>{if(!N||!N.type.startsWith("image/")){T(void 0);return}const M=URL.createObjectURL(N);return T(M),()=>URL.revokeObjectURL(M)},[N]);const C=a?s:r,O=_.useMemo(()=>N?VC(N.size):"",[N]);function $(M){k||S(M),g==null||g(M)}return h.jsxs("div",{className:["dsn-attachment-field",p].filter(Boolean).join(" "),"data-disabled":o||void 0,"data-error":a||void 0,children:[n&&h.jsx("p",{className:"dsn-attachment-field-label",children:t}),h.jsxs("div",{className:"dsn-attachment-field-control",children:[N?h.jsx(Gd,{fileName:N.name,fileSize:O,previewVariant:N.type.startsWith("image/")?"image":"file",previewSrc:E,loading:l,disabled:o,action:"remove",onRemove:o||l?void 0:()=>{$(null),b.current&&(b.current.value="")},"aria-label":N.name}):h.jsx(we,{variant:"secondary",size:"md",disabled:o,showLeadingIcon:!0,leadingIcon:h.jsx(IC,{size:16,"aria-hidden":"true"}),onClick:()=>{var M;return(M=b.current)==null?void 0:M.click()},"aria-label":m??c,children:c}),h.jsx("input",{ref:b,id:x,className:"dsn-attachment-field-native",type:"file",disabled:o,accept:u,"aria-label":m??c,"aria-describedby":i&&C?y:void 0,onChange:M=>{var P;const j=((P=M.target.files)==null?void 0:P[0])??null;$(j)}})]}),i&&C&&h.jsx("p",{id:y,className:"dsn-attachment-field-helper",children:C})]})}const Xd=15,By=2*Math.PI*Xd,YC="70.7 23.6";function Wy({value:e,size:t="lg",label:n,className:r}){const i=e!==void 0,a=i?Math.min(100,Math.max(0,e)):void 0,s=i?By*(1-a/100):void 0,o=["dsn-progress-ring",r].filter(Boolean).join(" "),l=i?"progressbar":"status";return h.jsx("div",{role:l,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":a,"aria-label":n,"aria-live":"polite",className:o,"data-size":t,"data-mode":i?"determinate":"indeterminate",children:h.jsxs("svg",{viewBox:"0 0 36 36","aria-hidden":"true",focusable:"false",children:[i&&h.jsx("circle",{className:"dsn-progress-ring-track",cx:"18",cy:"18",r:Xd,fill:"none",strokeWidth:"3"}),h.jsx("circle",{className:"dsn-progress-ring-fill",cx:"18",cy:"18",r:Xd,fill:"none",strokeWidth:"3",strokeLinecap:"round",transform:"rotate(-90 18 18)",strokeDasharray:i?By:YC,strokeDashoffset:s})]})})}function GC({variant:e="file",descriptionPosition:t="outside",loading:n=!1,title:r="Title",metaData:i="Meta data",hasMetadata:a=!0,showDescription:s=!0,imageSrc:o,imageAlt:l="Attachment preview",action:u="remove",showActionOnHover:c=!1,onActionClick:d,className:f,"aria-label":g}){const p=["dsn-attachment-card",f].filter(Boolean).join(" "),m=u!=="none",v=u==="more"?`More options for ${r}`:`Remove ${r}`;return h.jsxs("article",{className:p,"data-variant":e,"data-description-position":t,"data-loading":n||void 0,"data-show-action-on-hover":c||void 0,"aria-label":g??r,children:[h.jsxs("div",{className:"dsn-attachment-card-thumbnail",children:[e==="picture"&&o?h.jsx("img",{src:o,alt:l,className:"dsn-attachment-card-image"}):null,e==="file"&&!n&&h.jsx("span",{className:"dsn-attachment-card-file-icon","aria-hidden":"true",children:h.jsx(Iy,{size:32,strokeWidth:1.75})}),n&&h.jsx("span",{className:"dsn-attachment-card-loading",children:h.jsx(Wy,{size:"lg",label:`Loading ${r}`})}),m&&h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:u==="more"?h.jsx(Dy,{size:16,"aria-hidden":"true"}):h.jsx(Dr,{size:16,"aria-hidden":"true"}),className:"dsn-attachment-card-action",onClick:d,"aria-label":v,"aria-haspopup":u==="more"?"menu":void 0}),s&&t==="inside"&&h.jsxs("div",{className:"dsn-attachment-card-info dsn-attachment-card-info--inside",children:[h.jsx("p",{className:"dsn-attachment-card-title",children:r}),a&&h.jsx("p",{className:"dsn-attachment-card-meta",children:i})]})]}),s&&t==="outside"&&h.jsxs("div",{className:"dsn-attachment-card-info dsn-attachment-card-info--outside",children:[h.jsx("p",{className:"dsn-attachment-card-title",children:r}),a&&h.jsx("p",{className:"dsn-attachment-card-meta",children:i})]})]})}function Uy(e,t){if(typeof window>"u"||typeof document>"u")return t;const n=window.getComputedStyle(document.documentElement).getPropertyValue(e).trim(),r=Number.parseFloat(n);return Number.isFinite(r)?r:t}function XC(e,t,n){return n?e:e?`${e} ${t}`:t}function Jd({content:e,children:t,placement:n="top",delay:r=150,open:i,defaultOpen:a=!1,disabled:s=!1,className:o,id:l}){const u=_.useId(),c=l??`dsn-tooltip-${u}`,d=_.useRef(null),f=_.useRef(null),g=_.useRef(null),p=_.useRef(null),m=i!==void 0,[v,x]=_.useState(a),[y,b]=_.useState(null),k=s?!1:m?i:v,w=C=>{m||x(C)},S=()=>{p.current&&(clearTimeout(p.current),p.current=null)},N=()=>{s||(S(),p.current=setTimeout(()=>w(!0),r))},E=()=>{S(),w(!1)};_.useEffect(()=>()=>S(),[]),_.useEffect(()=>{if(!k)return;const C=O=>{O.key==="Escape"&&w(!1)};return document.addEventListener("keydown",C),()=>document.removeEventListener("keydown",C)},[k]),_.useEffect(()=>{if(!k||!f.current||!g.current)return;const C=Uy("--space-small",8),O=Uy("--space-tiny",4),$=()=>{if(!f.current||!g.current)return;const P=f.current.getBoundingClientRect(),F=g.current.getBoundingClientRect(),B=F.width,W=F.height,q=P.left+P.width/2,D=P.top-W-O,A=D>=C,U=A?"top":"bottom",Y=A?D:P.bottom+O,G=Math.max(C,window.innerHeight-W-C),J=Math.min(Math.max(Y,C),G),R=q-B/2,K=Math.max(C,window.innerWidth-B-C),Z=Math.min(Math.max(R,C),K);b({top:J,left:Z,placement:U})};$();const M=window.requestAnimationFrame($),j=typeof ResizeObserver<"u"?new ResizeObserver(()=>$()):null;return j&&(j.observe(f.current),j.observe(g.current)),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.cancelAnimationFrame(M),j==null||j.disconnect(),window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[k]);const T=_.cloneElement(t,{"aria-describedby":XC(t.props["aria-describedby"],c,s)});return h.jsxs("span",{ref:d,className:["dsn-tooltip",o].filter(Boolean).join(" "),onMouseEnter:N,onMouseLeave:E,onFocus:N,onBlur:C=>{var $;const O=C.relatedTarget;O&&(($=d.current)!=null&&$.contains(O))||E()},children:[h.jsx("span",{ref:f,className:"dsn-tooltip-trigger",children:T}),h.jsx("span",{ref:g,id:c,role:"tooltip",className:"dsn-tooltip-bubble","data-placement":(y==null?void 0:y.placement)??n,hidden:!k,style:y?{top:y.top,left:y.left}:void 0,children:e})]})}function Hy({value:e,label:t,className:n}){const r=Math.min(100,Math.max(0,e)),i=r===0?"0px":`calc(${r}% + 2px)`,a=["dsn-progress-bar",n].filter(Boolean).join(" ");return h.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":r,"aria-label":t,className:a,children:h.jsx("div",{className:"dsn-progress-bar-track",children:h.jsx("div",{className:"dsn-progress-bar-fill",style:{width:i}})})})}function JC({fileName:e="File name",fileType:t="PDF",fileSize:n="10 Mb",previewVariant:r="image",previewSrc:i,state:a="default",uploadProgress:s=40,className:o,onCopyLink:l,onDownload:u,onCancelUpload:c,"aria-label":d}){const f=a==="uploading",g=["dsn-file-row",o].filter(Boolean).join(" ");return h.jsxs("article",{className:g,"data-state":a,"aria-label":d??e,children:[h.jsx("div",{className:"dsn-file-row-thumbnail",children:h.jsx(Yd,{variant:r,imageSrc:i,size:"large","aria-label":`${r} preview`})}),h.jsxs("div",{className:"dsn-file-row-content",children:[h.jsxs("div",{className:"dsn-file-row-title-wrap",children:[h.jsx("p",{className:"dsn-file-row-title",children:e}),f&&h.jsx(we,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Dr,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Cancel upload for ${e}`,onClick:c})]}),!f&&h.jsxs(h.Fragment,{children:[h.jsxs("p",{className:"dsn-file-row-meta",children:[h.jsx("span",{children:t}),h.jsx("span",{"aria-hidden":"true",children:"•"}),h.jsx("span",{children:n})]}),h.jsxs(Fi,{size:"sm",spaceBetween:!0,className:"dsn-file-row-actions","aria-label":`Actions for ${e}`,children:[h.jsx(Jd,{content:"Copy link",children:h.jsx(we,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Fy,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Copy link for ${e}`,onClick:l})}),h.jsx(Jd,{content:"Download",children:h.jsx(we,{variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Ly,{size:16,"aria-hidden":"true"}),className:"dsn-file-row-action-btn","aria-label":`Download ${e}`,onClick:u})})]})]}),f&&h.jsx("div",{className:"dsn-file-row-progress",children:h.jsx(Hy,{value:s,label:`Uploading ${e}`})})]})]})}function Zd({direction:e="horizontal",decorative:t=!1,className:n}){const r=["dsn-separator",n].filter(Boolean).join(" ");return e==="horizontal"?h.jsx("hr",{className:r,"data-direction":"horizontal","aria-hidden":t?!0:void 0}):h.jsx("div",{role:"separator","aria-orientation":"vertical",className:r,"data-direction":"vertical","aria-hidden":t?!0:void 0})}function ZC({value:e,label:t,className:n}){const r=e!==void 0,i=r?Math.min(100,Math.max(0,e)):void 0,a=["dsn-loading-bar",n].filter(Boolean).join(" ");return h.jsx("div",{role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":i,"aria-label":t,"aria-live":"polite",className:a,"data-mode":r?"determinate":"indeterminate",children:h.jsx("div",{className:"dsn-loading-bar-fill",style:r?{width:`${i}%`}:void 0})})}function QC({type:e="avatar",className:t}){const n=["dsn-skeleton-loading",t].filter(Boolean).join(" ");return h.jsx("div",{className:n,"data-type":e,"aria-hidden":"true",children:h.jsx("div",{className:"dsn-skeleton-loading-glow"})})}function eM(){return h.jsx("svg",{width:"9",height:"7",viewBox:"0 0 9 7",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M0.625 3.125L3.125 5.625L8.125 0.625",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function Xn({size:e="md",checked:t=!1,indeterminate:n=!1,disabled:r=!1,label:i="Label",description:a="Description",descriptionRight:s="Assist label",showContent:o=!0,showLabel:l=!0,showDescription:u=!1,showDescriptionRight:c=!1,showAvatar:d=!1,avatarProps:f,showLeadingIcon:g=!1,leadingIcon:p,showTrailingIcon:m=!0,trailingIcon:v,showBadge:x=!1,badgeCount:y=1,badgeSize:b="sm",badgeVariant:k="critical",showTag:w=!1,tagLabel:S="Label",tagVariant:N="error",showButtons:E=!1,actionAriaLabel:T="Open actions",onActionClick:C,showSwitcherRight:O=!1,switcherChecked:$=!1,onSwitcherChange:M,onCheckedChange:j,className:P,"aria-label":F}){const B=["dsn-checkbox",P].filter(Boolean).join(" "),W=n?"mixed":t?"true":"false";function q(){r||j==null||j(!t)}function D(A){A.target===A.currentTarget&&A.key===" "&&(A.preventDefault(),q())}return h.jsxs("div",{className:B,"data-size":e,"data-has-content":o||void 0,"data-disabled":r||void 0,"data-checked":t||void 0,"data-indeterminate":n||void 0,role:"checkbox","aria-checked":W,"aria-disabled":r||void 0,"aria-label":F,tabIndex:r?-1:0,onClick:r?void 0:q,onKeyDown:D,children:[h.jsx("span",{className:"dsn-checkbox-indicator-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-checkbox-indicator",children:(t||n)&&h.jsx("span",{className:"dsn-checkbox-mark",children:n?"—":h.jsx(eM,{})})})}),o&&h.jsxs("span",{className:"dsn-checkbox-content",children:[d&&h.jsx("span",{className:"dsn-checkbox-avatar-wrap",children:h.jsx(Ri,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...f})}),g&&h.jsx("span",{className:"dsn-checkbox-icon-wrap","aria-hidden":"true",children:p??h.jsx(gr,{})}),l&&h.jsxs("span",{className:"dsn-checkbox-label-wrap",children:[h.jsx("span",{className:"dsn-checkbox-label",children:i}),u&&h.jsx("span",{className:"dsn-checkbox-description",children:a})]}),c&&h.jsx("span",{className:"dsn-checkbox-description-right",children:s}),x&&h.jsx("span",{className:"dsn-checkbox-badge-wrap",children:h.jsx(Ys,{size:b,variant:k,count:y})}),w&&h.jsx("span",{className:"dsn-checkbox-tag-wrap",children:h.jsx(Ir,{size:"sm",variant:N,label:S})}),m&&h.jsx("span",{className:"dsn-checkbox-icon-wrap","aria-hidden":"true",children:v??h.jsx(gr,{})}),E&&h.jsx("span",{className:"dsn-checkbox-action-wrap",onClick:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),children:h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(gr,{}),"aria-label":T,onClick:A=>{A.stopPropagation(),C==null||C(A)}})}),O&&h.jsx("span",{className:"dsn-checkbox-switcher-wrap",onClick:A=>A.stopPropagation(),onKeyDown:A=>A.stopPropagation(),children:h.jsx(La,{size:"sm",checked:$,disabled:r,"aria-label":"Toggle option",onChange:M})})]})]})}function Qd({size:e="md",checked:t=!1,disabled:n=!1,label:r="Label",description:i="Description",descriptionRight:a="Assist label",showContent:s=!0,showLabel:o=!0,showDescription:l=!1,showDescriptionRight:u=!1,showAvatar:c=!1,avatarProps:d,showLeadingIcon:f=!1,leadingIcon:g,showTrailingIcon:p=!0,trailingIcon:m,showBadge:v=!1,badgeCount:x=1,badgeSize:y="sm",badgeVariant:b="critical",showTag:k=!1,tagLabel:w="Label",tagVariant:S="error",showButtons:N=!1,actionAriaLabel:E="Open actions",onActionClick:T,showSwitcherRight:C=!1,switcherChecked:O=!1,onSwitcherChange:$,onCheckedChange:M,className:j,"aria-label":P}){const F=["dsn-radio",j].filter(Boolean).join(" ");function B(){n||t||M==null||M(!0)}function W(q){q.target===q.currentTarget&&q.key===" "&&(q.preventDefault(),B())}return h.jsxs("div",{className:F,"data-size":e,"data-has-content":s||void 0,"data-disabled":n||void 0,"data-checked":t||void 0,role:"radio","aria-checked":t?"true":"false","aria-disabled":n||void 0,"aria-label":P,tabIndex:n?-1:0,onClick:n?void 0:B,onKeyDown:W,children:[h.jsx("span",{className:"dsn-radio-indicator-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-radio-indicator",children:h.jsx("span",{className:"dsn-radio-dot"})})}),s&&h.jsxs("span",{className:"dsn-radio-content",children:[c&&h.jsx("span",{className:"dsn-radio-avatar-wrap",children:h.jsx(Ri,{size:"xs",variant:"profile",fill:"initials",initials:"AC",name:"Avatar",...d})}),f&&h.jsx("span",{className:"dsn-radio-icon-wrap","aria-hidden":"true",children:g??h.jsx(gr,{})}),o&&h.jsxs("span",{className:"dsn-radio-label-wrap",children:[h.jsx("span",{className:"dsn-radio-label",children:r}),l&&h.jsx("span",{className:"dsn-radio-description",children:i})]}),u&&h.jsx("span",{className:"dsn-radio-description-right",children:a}),v&&h.jsx("span",{className:"dsn-radio-badge-wrap",children:h.jsx(Ys,{size:y,variant:b,count:x})}),k&&h.jsx("span",{className:"dsn-radio-tag-wrap",children:h.jsx(Ir,{size:"sm",variant:S,label:w})}),p&&h.jsx("span",{className:"dsn-radio-icon-wrap","aria-hidden":"true",children:m??h.jsx(gr,{})}),N&&h.jsx("span",{className:"dsn-radio-action-wrap",onClick:q=>q.stopPropagation(),onKeyDown:q=>q.stopPropagation(),children:h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(gr,{}),"aria-label":E,onClick:q=>{q.stopPropagation(),T==null||T(q)}})}),C&&h.jsx("span",{className:"dsn-radio-switcher-wrap",onClick:q=>q.stopPropagation(),onKeyDown:q=>q.stopPropagation(),children:h.jsx(La,{size:"sm",checked:O,disabled:n,"aria-label":"Toggle option",onChange:$})})]})]})}function tM({id:e,label:t,placeholder:n,value:r,defaultValue:i,disabled:a=!1,error:s=!1,required:o=!1,helperText:l,errorMessage:u,maxLength:c,leadingIcon:d,trailingIcon:f,helperIcon:g,onChange:p,onBlur:m,onFocus:v,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,className:w}){const S=_.useId(),N=e??`dsn-text-input-${S}`,E=`${N}-helper`,C=!!l||s&&!!u?E:void 0,[O,$]=_.useState(()=>(r??i??"").length),M=r!==void 0?r.length:O;function j(W){r===void 0&&$(W.target.value.length),p==null||p(W)}const P=!!l||s&&!!u||c!==void 0,F=f!=null&&c===void 0,B=s&&u?u:l;return h.jsxs("div",{className:`dsn-text-input${w?` ${w}`:""}`,"data-error":s||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-text-input-label",htmlFor:N,children:[t,o&&h.jsxs("span",{className:"dsn-text-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-text-input-control",children:[d&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:d}),h.jsx("input",{type:"text",id:N,className:"dsn-text-input-field",placeholder:n,value:r,defaultValue:i,disabled:a,maxLength:c,"aria-invalid":s||void 0,"aria-required":o||void 0,"aria-describedby":C,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,onChange:j,onBlur:m,onFocus:v}),F&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:f})]}),P&&h.jsxs("div",{className:"dsn-text-input-meta",children:[h.jsxs("div",{className:"dsn-text-input-helper-inner",children:[g&&h.jsx("span",{className:"dsn-text-input-icon","aria-hidden":"true",children:g}),B!==void 0&&h.jsx("p",{id:E,className:"dsn-text-input-helper",children:B})]}),c!==void 0&&h.jsxs("span",{className:"dsn-text-input-count","aria-live":"polite","aria-atomic":"true",children:[M,"/",c]})]})]})}function nM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function rM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M8 3V13M3 8H13",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})})}function ef(e,t,n){let r=e;return t!==void 0&&(r=Math.max(t,r)),n!==void 0&&(r=Math.min(n,r)),r}function Wi({id:e,label:t,placeholder:n,value:r,defaultValue:i,min:a,max:s,step:o=1,disabled:l=!1,error:u=!1,required:c=!1,helperText:d,errorMessage:f,helperIcon:g,onChange:p,onBlur:m,onFocus:v,"aria-label":x,"aria-labelledby":y,name:b,className:k}){const w=_.useId(),S=e??`dsn-number-input-${w}`,N=`${S}-helper`,T=!!d||u&&!!f?N:void 0,[C,O]=_.useState(()=>i!==void 0?String(i):""),$=r!==void 0?String(r):C,M=r!==void 0?r:C!==""?parseFloat(C):NaN,j=l||a!==void 0&&!isNaN(M)&&M<=a,P=l||s!==void 0&&!isNaN(M)&&M>=s;function F(U){const Y=U.target.value;if(r===void 0&&O(Y),Y===""||Y==="-")p==null||p(null);else{const G=parseFloat(Y);isNaN(G)||p==null||p(G)}}function B(U){const Y=parseFloat($);if(!isNaN(Y)){const G=ef(Y,a,s);if(G!==Y){const J=String(G);r===void 0&&O(J),p==null||p(G)}}m==null||m(U)}function W(){if(l||j)return;const U=isNaN(M)?a??0:M,Y=ef(U-o,a,s);r===void 0&&O(String(Y)),p==null||p(Y)}function q(){if(l||P)return;const U=isNaN(M)?a??0:M,Y=ef(U+o,a,s);r===void 0&&O(String(Y)),p==null||p(Y)}const D=!!d||u&&!!f,A=u&&f?f:d;return h.jsxs("div",{className:`dsn-number-input${k?` ${k}`:""}`,"data-error":u||void 0,"data-disabled":l||void 0,children:[t&&h.jsxs("label",{className:"dsn-number-input-label",htmlFor:S,children:[t,c&&h.jsxs("span",{className:"dsn-number-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-number-input-control",children:[h.jsx("input",{type:"text",inputMode:"numeric",id:S,className:"dsn-number-input-field",value:$,placeholder:n,disabled:l,name:b,"aria-invalid":u||void 0,"aria-required":c||void 0,"aria-describedby":T,"aria-label":x,"aria-labelledby":y,onChange:F,onBlur:B,onFocus:v}),h.jsxs("div",{className:"dsn-number-input-stepper",role:"group","aria-label":"Adjust value",children:[h.jsx("button",{type:"button",className:"dsn-number-input-btn","aria-label":"Decrease value",disabled:j,onClick:W,tabIndex:l?-1:void 0,children:h.jsx(nM,{})}),h.jsx("button",{type:"button",className:"dsn-number-input-btn","aria-label":"Increase value",disabled:P,onClick:q,tabIndex:l?-1:void 0,children:h.jsx(rM,{})})]})]}),D&&h.jsx("div",{className:"dsn-number-input-meta",children:h.jsxs("div",{className:"dsn-number-input-helper-inner",children:[g&&h.jsx("span",{className:"dsn-number-input-icon","aria-hidden":"true",children:g}),A!==void 0&&h.jsx("p",{id:N,className:"dsn-number-input-helper",children:A})]})})]})}function iM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("rect",{x:"2.5",y:"7.5",width:"11",height:"7",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("path",{d:"M5.5 7.5V5.5a2.5 2.5 0 0 1 5 0v2",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function aM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M1.5 8C2.5 5.5 5 3.5 8 3.5S13.5 5.5 14.5 8 12 12.5 8 12.5 2.5 10.5 1.5 8Z",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("circle",{cx:"8",cy:"8",r:"2",stroke:"currentColor",strokeWidth:"1.25"})]})}function sM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M2 2.5L14 13.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M6.5 6.8A2 2 0 0 0 8 10a2 2 0 0 0 1.5-.7M4.2 4.7C2.7 5.8 1.5 8 1.5 8s2 4.5 6.5 4.5c1.2 0 2.2-.3 3-.8M8 3.5c4 0 6.5 4.5 6.5 4.5s-.5 1-1.5 2",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function oM({id:e,label:t,placeholder:n,value:r,defaultValue:i,disabled:a=!1,error:s=!1,required:o=!1,helperText:l,errorMessage:u,helperIcon:c,trailingIcon:d,labelAction:f,autoComplete:g="current-password",name:p,className:m,onChange:v,onBlur:x,onFocus:y,"aria-label":b,"aria-labelledby":k}){const w=_.useId(),S=e??`dsn-password-input-${w}`,N=`${S}-helper`,[E,T]=_.useState(!1),C=s&&u?u:l,O=!!l||s&&!!u,$=O?N:void 0,M=O;return h.jsxs("div",{className:`dsn-password-input${m?` ${m}`:""}`,"data-error":s||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("div",{className:"dsn-password-input-label-row",children:[h.jsxs("label",{className:"dsn-password-input-label",htmlFor:S,children:[t,o&&h.jsxs("span",{className:"dsn-password-input-required","aria-hidden":"true",children:[" ","*"]})]}),f&&h.jsx("span",{className:"dsn-password-input-label-action",children:f})]}),h.jsxs("div",{className:"dsn-password-input-control",children:[h.jsx("span",{className:"dsn-password-input-lock","aria-hidden":"true",children:h.jsx(iM,{})}),h.jsx("input",{type:E?"text":"password",id:S,className:"dsn-password-input-field",placeholder:n,value:r,defaultValue:i,disabled:a,"aria-invalid":s||void 0,"aria-required":o||void 0,"aria-describedby":$,"aria-label":b,"aria-labelledby":k,autoComplete:g,name:p,onChange:v,onBlur:x,onFocus:y}),d&&h.jsx("span",{className:"dsn-password-input-trailing","aria-hidden":"true",children:d}),h.jsx("button",{type:"button",className:"dsn-password-input-toggle","aria-label":E?"Hide password":"Show password","aria-pressed":E,onClick:()=>T(j=>!j),disabled:a,tabIndex:a?-1:void 0,children:E?h.jsx(sM,{}):h.jsx(aM,{})})]}),M&&h.jsx("div",{className:"dsn-password-input-meta",children:h.jsxs("div",{className:"dsn-password-input-helper-inner",children:[c&&h.jsx("span",{className:"dsn-password-input-icon","aria-hidden":"true",children:c}),h.jsx("p",{id:N,className:"dsn-password-input-helper",children:C})]})})]})}function lM(){return h.jsx("span",{className:"dsn-pw-req-radio","aria-hidden":"true"})}function uM(){return h.jsxs("svg",{className:"dsn-pw-req-check",width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("circle",{cx:"8",cy:"8",r:"6.5",fill:"var(--surface-toggle-on)"}),h.jsx("path",{d:"M5.5 8.5l1.75 1.75L10.5 6.5",stroke:"white",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]})}function cM({label:e,met:t,className:n}){return h.jsxs("div",{className:`dsn-pw-requirement${n?` ${n}`:""}`,"data-met":t||void 0,role:"status","aria-label":`${e}: ${t?"satisfied":"not satisfied"}`,children:[t?h.jsx(uM,{}):h.jsx(lM,{}),h.jsx("span",{className:"dsn-pw-requirement-label",children:e})]})}function dM({length:e=6,value:t,defaultValue:n,status:r="idle",disabled:i=!1,label:a,labelAction:s,helperText:o,helperIcon:l,errorMessage:u,onChange:c,onComplete:d,"aria-label":f,className:g}){const v=`${`dsn-otp-${_.useId()}`}-status`,[x,y]=_.useState(()=>{const M=(t??n??"").slice(0,e);return Array.from({length:e},(j,P)=>M[P]??"")});_.useEffect(()=>{t!==void 0&&y(Array.from({length:e},(M,j)=>t[j]??""))},[t,e]);const b=_.useRef([]),k=!i&&r!=="verifying"&&r!=="correct";function w(M){y(M);const j=M.join("");c==null||c(j),M.every(P=>P!=="")&&(d==null||d(j))}function S(M,j){var W;const F=j.target.value.replace(/[^0-9]/g,"").slice(-1),B=[...x];B[M]=F,w(B),F&&M<e-1&&((W=b.current[M+1])==null||W.focus())}function N(M,j){var P,F,B;if(j.key==="Backspace"){j.preventDefault();const W=[...x];W[M]?(W[M]="",w(W)):M>0&&(W[M-1]="",w(W),(P=b.current[M-1])==null||P.focus())}else j.key==="ArrowLeft"&&M>0?(j.preventDefault(),(F=b.current[M-1])==null||F.focus()):j.key==="ArrowRight"&&M<e-1&&(j.preventDefault(),(B=b.current[M+1])==null||B.focus())}function E(M){M.target.select()}function T(M){var q;M.preventDefault();const j=M.clipboardData.getData("text").replace(/[^0-9]/g,"").slice(0,e);if(!j)return;const P=[...x];for(let D=0;D<j.length;D++)P[D]=j[D];y(P);const F=P.join("");c==null||c(F);const B=P.findIndex(D=>D===""),W=B===-1?e-1:B;(q=b.current[W])==null||q.focus(),P.every(D=>D!=="")&&(d==null||d(F))}function C(){return r==="verifying"?"Verifying code…":r==="correct"?"Verification successful":r==="error"?u??"Verification failed":""}const O=r==="error"&&u?u:o,$=!!O;return h.jsxs("div",{className:`dsn-otp${g?` ${g}`:""}`,"data-status":r!=="idle"?r:void 0,"data-disabled":i||void 0,children:[(a||s)&&h.jsxs("div",{className:"dsn-otp-label-row",children:[a&&h.jsx("span",{className:"dsn-otp-label",children:a}),s&&h.jsx("span",{className:"dsn-otp-label-action",children:s})]}),h.jsx("div",{className:"dsn-otp-stack",role:"group","aria-label":f??`Enter ${e}-digit verification code`,"aria-describedby":r!=="idle"?v:void 0,children:x.map((M,j)=>h.jsx("input",{ref:P=>{b.current[j]=P},className:"dsn-otp-cell",type:"text",inputMode:"numeric",pattern:"[0-9]*",autoComplete:j===0?"one-time-code":"off",maxLength:1,value:M,disabled:!k,"aria-label":`Digit ${j+1} of ${e}`,onChange:P=>S(j,P),onKeyDown:P=>N(j,P),onFocus:E,onPaste:T},j))}),h.jsx("div",{id:v,role:"status","aria-live":"polite","aria-atomic":"true",className:"dsn-otp-sr-only",children:C()}),$&&h.jsxs("div",{className:"dsn-otp-helper-row",children:[l&&h.jsx("span",{className:"dsn-otp-helper-icon","aria-hidden":"true",children:l}),h.jsx("p",{className:"dsn-otp-helper",children:O})]})]})}const qy=[{label:"United States (+1)",value:"+1"},{label:"Portugal (+351)",value:"+351"},{label:"United Kingdom (+44)",value:"+44"},{label:"Germany (+49)",value:"+49"}];function Jl(e){return e.replace(/\s+/g,"").replace(/^\+/,"")}function fM(e,t){const n=e.trim();if(!n.startsWith("+"))return null;const i=n.replace(/[^\d+]/g,"").slice(1);if(!i)return null;const s=[...t].sort((l,u)=>Jl(u.value).length-Jl(l.value).length).find(l=>i.startsWith(Jl(l.value)));if(!s)return null;const o=i.slice(Jl(s.value).length);return{countryCode:s.value,localNumber:o}}function hM({id:e,label:t,placeholder:n="1234567890",value:r,defaultValue:i,disabled:a=!1,error:s=!1,required:o=!1,helperText:l,errorMessage:u,helperIcon:c,countryCode:d,defaultCountryCode:f="+1",countryOptions:g=qy,onChange:p,onCountryCodeChange:m,onBlur:v,onFocus:x,"aria-label":y,"aria-labelledby":b,countryCodeAriaLabel:k="Country code",autoComplete:w="tel",name:S,className:N}){const E=_.useId(),T=e??`dsn-phone-input-${E}`,C=`${T}-helper`,O=`${T}-country-menu`,[$,M]=_.useState(f),j=d??$,[P,F]=_.useState(i??""),B=r??P,[W,q]=_.useState(!1),D=_.useRef(null),A=_.useRef(null),U=_.useRef([]),[Y,G]=_.useState(-1),J=s&&u?u:l,K=!!l||s&&!!u?C:void 0,Z=_.useMemo(()=>g.length===0?qy:g,[g]);function z(ue=!1){const ye=Z.findIndex(fe=>fe.value===j);return ye>=0?ye:Z.length===0?-1:ue?Z.length-1:0}function X(ue,ye){return Z.length===0?-1:(ue+ye+Z.length)%Z.length}function H(ue){d===void 0&&M(ue),m==null||m(ue)}function I(ue){r===void 0&&F(ue.target.value),p==null||p(ue)}function ne(ue){const ye=fM(ue.clipboardData.getData("text"),Z);ye&&(ue.preventDefault(),H(ye.countryCode??j),r===void 0&&F(ye.localNumber))}return _.useEffect(()=>{const ue=ye=>{!D.current||!W||D.current.contains(ye.target)||q(!1)};return document.addEventListener("mousedown",ue),()=>document.removeEventListener("mousedown",ue)},[W]),_.useEffect(()=>{var ye;if(!W||a){G(-1);return}const ue=z();G(ue),ue>=0&&((ye=U.current[ue])==null||ye.focus())},[j,a,W,Z]),h.jsxs("div",{ref:D,className:`dsn-phone-input${N?` ${N}`:""}`,"data-error":s||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-phone-input-label",htmlFor:T,children:[t,o&&h.jsxs("span",{className:"dsn-phone-input-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-phone-input-control",role:"group","aria-label":"Phone number",children:[h.jsxs("span",{className:"dsn-phone-input-country-wrap",children:[h.jsxs("button",{ref:A,type:"button",className:"dsn-phone-input-country-visual",disabled:a,"aria-label":k,"aria-haspopup":"menu","aria-expanded":W,"aria-controls":W?O:void 0,onClick:()=>q(ue=>!ue),onKeyDown:ue=>{(ue.key==="Enter"||ue.key===" "||ue.key==="ArrowDown")&&(ue.preventDefault(),q(!0)),ue.key==="ArrowUp"&&(ue.preventDefault(),G(z(!0)),q(!0)),ue.key==="Escape"&&q(!1)},children:[h.jsx("span",{className:"dsn-phone-input-country-code",children:j}),h.jsx("span",{className:"dsn-phone-input-country-chevron","aria-hidden":"true",children:h.jsx(zi,{size:16,strokeWidth:1.5,"aria-hidden":"true"})})]}),W&&!a&&h.jsx(Fr,{role:"menu","aria-label":`${k} options`,className:"dsn-phone-input-country-popover",contentClassName:"dsn-phone-input-country-popover-content",contentPadding:"small",anchorRef:A,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:O,children:Z.map((ue,ye)=>h.jsx(Bi,{ref:fe=>{U.current[ye]=fe},tabIndex:Y===ye?0:-1,onKeyDown:fe=>{var xe,Se,We,Ze,Nt;if(fe.key==="ArrowDown"){fe.preventDefault();const Ve=X(Y>=0?Y:z(),1);G(Ve),(xe=U.current[Ve])==null||xe.focus();return}if(fe.key==="ArrowUp"){fe.preventDefault();const Ve=X(Y>=0?Y:z(!0),-1);G(Ve),(Se=U.current[Ve])==null||Se.focus();return}if(fe.key==="Home"){fe.preventDefault(),G(0),(We=U.current[0])==null||We.focus();return}if(fe.key==="End"){fe.preventDefault();const Ve=Z.length-1;G(Ve),(Ze=U.current[Ve])==null||Ze.focus();return}fe.key==="Escape"&&(fe.preventDefault(),q(!1),(Nt=A.current)==null||Nt.focus())},className:"dsn-phone-input-country-option",label:ue.label,showLeadingIcon:!1,showTrailingIcon:j===ue.value,selected:j===ue.value,"aria-label":ue.label,onClick:()=>{var fe;H(ue.value),q(!1),(fe=A.current)==null||fe.focus()}},ue.value))})})]}),h.jsx("input",{type:"tel",id:T,className:"dsn-phone-input-field",placeholder:n,value:B,defaultValue:i,disabled:a,name:S,autoComplete:w,"aria-invalid":s||void 0,"aria-required":o||void 0,"aria-describedby":K,"aria-label":y,"aria-labelledby":b,onChange:I,onPaste:ne,onBlur:v,onFocus:x})]}),J&&h.jsx("div",{className:"dsn-phone-input-meta",children:h.jsxs("div",{className:"dsn-phone-input-helper-inner",children:[c&&h.jsx("span",{className:"dsn-phone-input-icon","aria-hidden":"true",children:c}),h.jsx("p",{id:C,className:"dsn-phone-input-helper",children:J})]})})]})}function pM({error:e=!1}){return e?h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 5V8M8 11H8.01M14 8C14 11.3137 11.3137 14 8 14C4.68629 14 2 11.3137 2 8C2 4.68629 4.68629 2 8 2C11.3137 2 14 4.68629 14 8Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})}):h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function gM({id:e,label:t,placeholder:n="Placeholder",value:r,defaultValue:i,disabled:a=!1,error:s=!1,required:o=!1,helperText:l,errorMessage:u,maxLength:c,minRows:d=3,helperIcon:f,leadingIcon:g,onChange:p,onBlur:m,onFocus:v,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,className:w}){const S=_.useId(),N=e??`dsn-text-area-${S}`,E=`${N}-helper`,[T,C]=_.useState(()=>(r??i??"").length),O=r!==void 0?r.length:T,$=s&&u?u:l,M=!!l||s&&!!u,j=M||c!==void 0,P=M?E:void 0,F=f??(M?h.jsx(pM,{error:s}):null);function B(W){r===void 0&&C(W.target.value.length),p==null||p(W)}return h.jsxs("div",{className:`dsn-text-area${w?` ${w}`:""}`,"data-error":s||void 0,"data-disabled":a||void 0,children:[t&&h.jsxs("label",{className:"dsn-text-area-label",htmlFor:N,children:[t,o&&h.jsxs("span",{className:"dsn-text-area-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-text-area-control",children:[g&&h.jsx("span",{className:"dsn-text-area-leading-icon","aria-hidden":"true",children:g}),h.jsx("textarea",{id:N,className:"dsn-text-area-field",rows:d,placeholder:n,value:r,defaultValue:i,disabled:a,maxLength:c,"aria-invalid":s||void 0,"aria-required":o||void 0,"aria-describedby":P,"aria-label":x,"aria-labelledby":y,autoComplete:b,name:k,onChange:B,onBlur:m,onFocus:v})]}),j&&h.jsxs("div",{className:"dsn-text-area-meta",children:[h.jsxs("div",{className:"dsn-text-area-helper-inner",children:[F&&h.jsx("span",{className:"dsn-text-area-helper-icon","aria-hidden":"true",children:F}),$&&h.jsx("p",{id:E,className:"dsn-text-area-helper",children:$})]}),c!==void 0&&h.jsxs("span",{className:"dsn-text-area-count","aria-live":"polite","aria-atomic":"true",children:[O,"/",c]})]})]})}function mM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 11.5L14 14M12.6667 7.33333C12.6667 10.2789 10.2789 12.6667 7.33333 12.6667C4.38781 12.6667 2 10.2789 2 7.33333C2 4.38781 4.38781 2 7.33333 2C10.2789 2 12.6667 4.38781 12.6667 7.33333Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function vM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 4.5L4.5 11.5M4.5 4.5L11.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function Vy({id:e,variant:t="default",label:n="Label",placeholder:r="Search",value:i,defaultValue:a,disabled:s=!1,error:o=!1,helperText:l="Help text",errorMessage:u,maxLength:c,required:d=!1,helperIcon:f,onChange:g,onFocus:p,onBlur:m,onClear:v,className:x,name:y,autoComplete:b,"aria-label":k,"aria-labelledby":w}){const S=_.useId(),N=e??`dsn-search-bar-${S}`,E=`${N}-helper`,[T,C]=_.useState(()=>(i??a??"").length),O=i!==void 0,$=i??void 0,M=(i??"").length,j=O?M:T,P=O?M>0:T>0,B=t==="default"&&(!!l||o&&!!u||c!==void 0||o&&!!u),W=o&&u?u:l,q=["dsn-search-bar",x].filter(Boolean).join(" ");function D(U){O||C(U.target.value.length),g==null||g(U)}function A(){if(!O){C(0);const U=document.getElementById(N);U&&(U.value="",U.focus())}v==null||v()}return h.jsxs("div",{className:q,"data-variant":t,"data-error":o||void 0,"data-disabled":s||void 0,children:[t==="default"&&h.jsxs("label",{className:"dsn-search-bar-label",htmlFor:N,children:[n,d&&h.jsxs("span",{className:"dsn-search-bar-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{className:"dsn-search-bar-control",children:[h.jsx("span",{className:"dsn-search-bar-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-search-bar-icon",children:h.jsx(mM,{})})}),h.jsx("span",{className:"dsn-search-bar-label-wrap",children:h.jsx("input",{id:N,type:"search",className:"dsn-search-bar-field",placeholder:r,value:$,defaultValue:a,disabled:s,maxLength:c,name:y,autoComplete:b,"aria-invalid":o||void 0,"aria-required":d||void 0,"aria-describedby":B?E:void 0,"aria-label":k,"aria-labelledby":w,onChange:D,onFocus:p,onBlur:m})}),P&&!s&&h.jsx("span",{className:"dsn-search-bar-icon-wrap dsn-search-bar-clear",children:h.jsx("button",{type:"button",className:"dsn-search-bar-clear-btn","aria-label":"Clear search",onClick:A,children:h.jsx("span",{className:"dsn-search-bar-icon","aria-hidden":"true",children:h.jsx(vM,{})})})})]}),B&&h.jsxs("div",{className:"dsn-search-bar-meta",children:[h.jsxs("div",{className:"dsn-search-bar-helper-inner",children:[f&&h.jsx("span",{className:"dsn-search-bar-helper-icon","aria-hidden":"true",children:f}),W!==void 0&&h.jsx("p",{id:E,className:"dsn-search-bar-helper",children:W})]}),c!==void 0&&h.jsxs("span",{className:"dsn-search-bar-count","aria-live":"polite","aria-atomic":"true",children:[j,"/",c]})]})]})}const yM=[{value:"placeholder-a",label:"Placeholder A"},{value:"placeholder-b",label:"Placeholder B"},{value:"placeholder-c",label:"Placeholder C"},{value:"placeholder-d",label:"Placeholder D"}];function xM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M4 6L8 10L12 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function bM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.5"})})}function _M({id:e,label:t="Label",placeholder:n="Placeholder",options:r=yM,value:i,defaultValue:a,open:s,defaultOpen:o=!1,disabled:l=!1,error:u=!1,helperText:c="Help text",errorMessage:d,required:f=!1,helperIcon:g,className:p,name:m,onChange:v,onOpenChange:x,"aria-label":y,"aria-labelledby":b}){const k=_.useId(),w=e??`dsn-select-${k}`,S=`${w}-menu`,N=`${w}-helper`,E=`${w}-label`,T=i!==void 0,[C,O]=_.useState(a??""),$=T?i:C,M=s!==void 0,[j,P]=_.useState(o),F=M?s:j,B=_.useRef(null),W=_.useRef(null),q=_.useRef(null),D=_.useRef([]),[A,U]=_.useState(-1),Y=_.useMemo(()=>r.find(z=>z.value===$),[r,$]),G=u&&d?d:c,J=_.useCallback((z,X)=>{var I;if(r.length===0)return-1;let H=z;for(let ne=0;ne<r.length;ne+=1)if(H=(H+X+r.length)%r.length,!((I=r[H])!=null&&I.disabled))return H;return-1},[r]),R=_.useCallback((z=!1)=>{var H;if(r.length===0)return-1;const X=r.findIndex(I=>I.value===$&&!I.disabled);if(X>=0)return X;if(z){for(let I=r.length-1;I>=0;I-=1)if(!((H=r[I])!=null&&H.disabled))return I;return-1}return r.findIndex(I=>!I.disabled)},[r,$]),K=_.useCallback(z=>{M||P(z),x==null||x(z)},[M,x]);function Z(z){var X;z.disabled||l||(T||O(z.value),v==null||v(z.value,z),K(!1),(X=q.current)==null||X.focus())}return _.useEffect(()=>{function z(X){B.current&&(B.current.contains(X.target)||K(!1))}return document.addEventListener("mousedown",z),()=>{document.removeEventListener("mousedown",z)}},[K]),_.useEffect(()=>{var X;if(!F||l){U(-1);return}const z=R();U(z),z>=0&&((X=D.current[z])==null||X.focus())},[l,R,F]),h.jsxs("div",{ref:B,className:["dsn-select",p].filter(Boolean).join(" "),"data-disabled":l||void 0,"data-error":u||void 0,"data-open":F||void 0,children:[h.jsxs("label",{className:"dsn-select-label",id:E,htmlFor:w,children:[t,f&&h.jsxs("span",{className:"dsn-select-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{ref:W,className:"dsn-select-control-wrap",children:[h.jsxs("button",{ref:q,id:w,type:"button",className:"dsn-select-control",disabled:l,"aria-haspopup":"menu","aria-expanded":F,"aria-controls":F?S:void 0,"aria-label":y,"aria-labelledby":b??E,"aria-invalid":u||void 0,"aria-required":f||void 0,"aria-describedby":G?N:void 0,onClick:()=>K(!F),onKeyDown:z=>{(z.key==="ArrowDown"||z.key==="ArrowUp"||z.key==="Enter"||z.key===" ")&&(z.preventDefault(),z.key==="ArrowUp"&&U(R(!0)),K(!0)),z.key==="Escape"&&K(!1)},children:[h.jsx("span",{className:"dsn-select-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-icon",children:h.jsx(bM,{})})}),h.jsx("span",{className:"dsn-select-label-wrap",children:h.jsx("span",{className:"dsn-select-value","data-placeholder":!Y||void 0,children:(Y==null?void 0:Y.label)??n})}),h.jsx("span",{className:"dsn-select-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-icon",children:h.jsx(xM,{})})})]}),F&&!l&&h.jsx(Fr,{role:"menu","aria-label":`${t} options`,className:"dsn-select-popover",contentClassName:"dsn-select-popover-stack",contentPadding:"small",anchorRef:W,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:S,children:r.map((z,X)=>h.jsx(Bi,{tabIndex:A===X?0:-1,onKeyDown:H=>{var I,ne,ue,ye,fe,xe;if(H.key==="ArrowDown"){H.preventDefault();const Se=J(A>=0?A:R(),1);U(Se),Se>=0&&((I=D.current[Se])==null||I.focus());return}if(H.key==="ArrowUp"){H.preventDefault();const Se=J(A>=0?A:R(!0),-1);U(Se),Se>=0&&((ne=D.current[Se])==null||ne.focus());return}if(H.key==="Home"){H.preventDefault();const Se=r.findIndex(We=>!We.disabled);U(Se),Se>=0&&((ue=D.current[Se])==null||ue.focus());return}if(H.key==="End"){H.preventDefault();let Se=-1;for(let We=r.length-1;We>=0;We-=1)if(!((ye=r[We])!=null&&ye.disabled)){Se=We;break}U(Se),Se>=0&&((fe=D.current[Se])==null||fe.focus());return}H.key==="Escape"&&(H.preventDefault(),K(!1),(xe=q.current)==null||xe.focus())},ref:H=>{D.current[X]=H},className:"dsn-select-option",label:z.label,description:z.description,showDescription:!!z.description,showLeadingIcon:!0,showTrailingIcon:$===z.value,selected:$===z.value,disabled:z.disabled,onClick:()=>Z(z),"aria-label":z.label},z.value))})})]}),m&&h.jsx("input",{type:"hidden",name:m,value:$??""}),G&&h.jsxs("div",{className:"dsn-select-meta",children:[g&&h.jsx("span",{className:"dsn-select-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-select-meta-icon",children:g})}),h.jsx("p",{id:N,className:"dsn-select-helper",children:G})]})]})}const wM=[{value:"placeholder-a",label:"Label A"},{value:"placeholder-b",label:"Label B"},{value:"placeholder-c",label:"Label C"},{value:"placeholder-d",label:"Label D"}];function Ky({selectionMode:e="single",id:t,label:n="Label",showLabel:r=!0,placeholder:i="Placeholder",options:a=wM,value:s,defaultValue:o,values:l,defaultValues:u=[],open:c,defaultOpen:d=!1,disabled:f=!1,error:g=!1,helperText:p="Help text",showHelper:m=!0,errorMessage:v,required:x=!1,helperIcon:y,className:b,name:k,onChange:w,onValuesChange:S,onOpenChange:N,onInputChange:E,confirmLabel:T="Confirm","aria-label":C,"aria-labelledby":O}){const $=e==="multi",M=_.useId(),j=t??`dsn-combobox-${M}`,P=`${j}-listbox`,F=`${j}-helper`,B=`${j}-label`,W=s!==void 0,[q,D]=_.useState(o??""),A=W?s:q,U=_.useMemo(()=>a.find(re=>re.value===A),[a,A]),Y=l!==void 0,[G,J]=_.useState(u),R=_.useMemo(()=>(Y?l??[]:G).filter(re=>a.some(ve=>ve.value===re)),[G,Y,a,l]),K=_.useMemo(()=>new Set(R),[R]),[Z,z]=_.useState(R),X=_.useMemo(()=>new Set(Z),[Z]),H=_.useMemo(()=>a.filter(re=>K.has(re.value)),[K,a]),[I,ne]=_.useState($?"":(U==null?void 0:U.label)??"");_.useEffect(()=>{$||ne((U==null?void 0:U.label)??"")},[$,U==null?void 0:U.label]),_.useEffect(()=>{if($&&!Y){const re=G.filter(ve=>a.some(ge=>ge.value===ve));re.length!==G.length&&J(re)}},[G,$,Y,a]);const ue=c!==void 0,[ye,fe]=_.useState(d),xe=ue?c:ye,Se=_.useRef(null),We=_.useRef(null),Ze=_.useRef(null),Nt=_.useRef(!1),Ve=_.useRef([]),[Qe,mt]=_.useState(-1),ht=g&&v?v:p,vt=I.trim().toLowerCase(),Le=_.useMemo(()=>vt.length===0?a:a.filter(re=>re.label.toLowerCase().includes(vt)),[vt,a]),Et=_.useCallback((re,ve)=>{var Ne;if(Le.length===0)return-1;let ge=re;for(let pt=0;pt<Le.length;pt+=1)if(ge=(ge+ve+Le.length)%Le.length,!((Ne=Le[ge])!=null&&Ne.disabled))return ge;return-1},[Le]),Tt=_.useCallback((re=!1)=>{var ge;if(Le.length===0)return-1;const ve=Le.findIndex(Ne=>Ne.value===A&&!Ne.disabled);if(ve>=0)return ve;if(re){for(let Ne=Le.length-1;Ne>=0;Ne-=1)if(!((ge=Le[Ne])!=null&&ge.disabled))return Ne;return-1}return Le.findIndex(Ne=>!Ne.disabled)},[Le,A]),at=_.useCallback(re=>{ue||fe(re),N==null||N(re)},[ue,N]),fr=_.useCallback(re=>{const ve=new Set(re);return a.filter(ge=>ve.has(ge.value)).map(ge=>ge.value)},[a]),Mn=_.useCallback(()=>{if(!$)return;const re=fr(Z);Y||J(re),S==null||S(re,a.filter(ve=>re.includes(ve.value)))},[$,Y,fr,S,a,Z]),Ut=_.useCallback(()=>{Mn(),at(!1)},[Mn,at]),me=_.useCallback(re=>{z(ve=>ve.includes(re)?ve.filter(ge=>ge!==re):[...ve,re])},[]),Ie=_.useCallback(re=>{const ve=R.filter(ge=>ge!==re);Y||J(ve),S==null||S(ve,a.filter(ge=>ve.includes(ge.value))),xe&&z(ge=>ge.filter(Ne=>Ne!==re))},[R,xe,Y,S,a]);function Ct(re){var ve;re.disabled||f||(W||D(re.value),ne(re.label),E==null||E(re.label),w==null||w(re.value,re),at(!1),Nt.current=!0,(ve=Ze.current)==null||ve.focus())}function bt(){var re,ve;if($){ne(""),E==null||E(""),at(!0),(re=Ze.current)==null||re.focus();return}W||D(""),ne(""),E==null||E(""),at(!0),(ve=Ze.current)==null||ve.focus()}return _.useEffect(()=>{function re(ve){Se.current&&(Se.current.contains(ve.target)||at(!1))}return document.addEventListener("mousedown",re),()=>{document.removeEventListener("mousedown",re)}},[at]),_.useEffect(()=>{if(!xe||f){mt(-1);return}mt(Tt())},[f,Tt,xe]),_.useEffect(()=>{$&&xe&&z(R)},[R,$,xe]),h.jsxs("div",{ref:Se,className:["dsn-combobox",b].filter(Boolean).join(" "),"data-disabled":f||void 0,"data-error":g||void 0,"data-open":xe||void 0,"data-filled":($?H.length>0:!!U)||void 0,children:[r&&h.jsxs("label",{className:"dsn-combobox-label",id:B,htmlFor:j,children:[n,x&&h.jsxs("span",{className:"dsn-combobox-required","aria-hidden":"true",children:[" ","*"]})]}),$&&H.length>0&&h.jsx("div",{className:"dsn-combobox-chip-stack",children:H.map(re=>h.jsx(Gs,{size:"md",label:re.label,showLeadingIcon:!1,showTrailingIcon:!1,onDismiss:()=>Ie(re.value)},re.value))}),h.jsxs("div",{ref:We,className:"dsn-combobox-control-wrap",children:[h.jsx("div",{className:"dsn-combobox-control",children:h.jsxs("div",{className:"dsn-combobox-input-row",children:[h.jsx("span",{className:"dsn-combobox-value-wrap",children:h.jsx("input",{ref:Ze,id:j,className:"dsn-combobox-input",type:"text",role:"combobox",autoComplete:"off",disabled:f,value:I,placeholder:i,"aria-expanded":xe,"aria-controls":xe?P:void 0,"aria-haspopup":$?"dialog":"listbox","aria-autocomplete":"list","aria-label":C,"aria-labelledby":O??(r?B:void 0),"aria-invalid":g||void 0,"aria-required":x||void 0,"aria-describedby":ht?F:void 0,onFocus:()=>{if(Nt.current){Nt.current=!1;return}f||at(!0)},onBlur:re=>{var ve;if($){const ge=re.relatedTarget;if(ge&&((ve=Se.current)!=null&&ve.contains(ge)))return;Ut()}},onClick:()=>{f||at(!0)},onChange:re=>{const ve=re.target.value;ne(ve),E==null||E(ve),xe||at(!0)},onKeyDown:re=>{var ve,ge;if(re.key==="ArrowDown"){if(re.preventDefault(),!xe){at(!0);return}const Ne=Et(Qe>=0?Qe:Tt(),1);mt(Ne),Ne>=0&&((ve=Ve.current[Ne])==null||ve.focus())}if(re.key==="ArrowUp"){if(re.preventDefault(),!xe){at(!0);return}const Ne=Et(Qe>=0?Qe:Tt(!0),-1);mt(Ne),Ne>=0&&((ge=Ve.current[Ne])==null||ge.focus())}if(re.key==="Enter"&&xe){if($)re.preventDefault(),Ut();else if(Qe>=0){re.preventDefault();const Ne=Le[Qe];Ne&&Ct(Ne)}}re.key==="Escape"&&(re.preventDefault(),$?Ut():at(!1))}})}),!!I&&!f&&h.jsx("button",{type:"button",className:"dsn-combobox-clear","aria-label":$?"Clear search":"Clear selection",onClick:bt,children:h.jsx(Vd,{size:16,"aria-hidden":"true"})}),h.jsx("span",{className:"dsn-combobox-chevron","aria-hidden":"true",children:h.jsx(zi,{size:16})})]})}),xe&&!f&&h.jsx(Fr,{role:$?"dialog":"listbox","aria-label":`${n} options`,className:"dsn-combobox-popover",contentClassName:"dsn-combobox-popover-stack",contentPadding:"small",anchorRef:We,offset:4,viewportMargin:16,matchAnchorWidth:!0,content:h.jsx("div",{id:P,children:Le.length===0?h.jsx("div",{className:"dsn-combobox-empty",children:"No options"}):$?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"dsn-combobox-multi-options",onMouseDown:re=>{re.preventDefault()},children:Le.map((re,ve)=>h.jsx("div",{ref:ge=>{Ve.current[ve]=ge},className:"dsn-combobox-multi-option","aria-disabled":re.disabled||void 0,tabIndex:Qe===ve?0:-1,onKeyDown:ge=>{var Ne,pt;if(ge.key==="ArrowDown"){ge.preventDefault();const Mt=Et(Qe>=0?Qe:Tt(),1);mt(Mt),Mt>=0&&((Ne=Ve.current[Mt])==null||Ne.focus());return}if(ge.key==="ArrowUp"){ge.preventDefault();const Mt=Et(Qe>=0?Qe:Tt(!0),-1);mt(Mt),Mt>=0&&((pt=Ve.current[Mt])==null||pt.focus());return}if(ge.key==="Enter"||ge.key===" "){ge.preventDefault(),re.disabled||me(re.value);return}ge.key==="Escape"&&(ge.preventDefault(),Ut())},children:h.jsx(Xn,{size:"md",checked:X.has(re.value),disabled:re.disabled,label:re.label,showLeadingIcon:!1,showTrailingIcon:!1,onCheckedChange:()=>{re.disabled||me(re.value)}})},re.value))}),h.jsx("div",{className:"dsn-combobox-multi-footer",children:h.jsx(we,{size:"md",variant:"primary",onClick:Ut,children:T})})]}):Le.map((re,ve)=>h.jsx(Bi,{tabIndex:Qe===ve?0:-1,ref:ge=>{Ve.current[ve]=ge},className:"dsn-combobox-option",label:re.label,description:re.description,showDescription:!!re.description,showLeadingIcon:!1,showTrailingIcon:!1,selected:A===re.value,disabled:re.disabled,onClick:()=>Ct(re),onKeyDown:ge=>{var Ne,pt,Mt;if(ge.key==="ArrowDown"){ge.preventDefault();const un=Et(Qe>=0?Qe:Tt(),1);mt(un),un>=0&&((Ne=Ve.current[un])==null||Ne.focus());return}if(ge.key==="ArrowUp"){ge.preventDefault();const un=Et(Qe>=0?Qe:Tt(!0),-1);mt(un),un>=0&&((pt=Ve.current[un])==null||pt.focus());return}if(ge.key==="Enter"||ge.key===" "){ge.preventDefault(),Ct(re);return}ge.key==="Escape"&&(ge.preventDefault(),at(!1),(Mt=Ze.current)==null||Mt.focus())}},re.value))})})]}),k&&($?R.map(re=>h.jsx("input",{type:"hidden",name:k,value:re},re)):h.jsx("input",{type:"hidden",name:k,value:A??""})),m&&ht&&h.jsxs("div",{className:"dsn-combobox-meta",children:[y&&h.jsx("span",{className:"dsn-combobox-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-combobox-meta-icon",children:y})}),h.jsx("p",{id:F,className:"dsn-combobox-helper",children:ht})]})]})}function kM({id:e,label:t,active:n,disabled:r,tabIndex:i,showLeadingIcon:a=!1,leadingIcon:s,showTrailingIcon:o=!1,trailingIcon:l,onSelect:u,onKeyDown:c,onFocus:d,buttonRef:f,ariaLabel:g}){return h.jsxs("button",{ref:f,id:e,type:"button",className:"dsn-segment-control-selector",role:"radio","aria-checked":n,"aria-disabled":r||void 0,"aria-label":g,"data-active":n||void 0,disabled:r,tabIndex:i,onClick:u,onKeyDown:c,onFocus:d,children:[a&&s&&h.jsx("span",{className:"dsn-segment-control-selector-icon","aria-hidden":"true",children:s}),h.jsx("span",{className:"dsn-segment-control-selector-label-wrap",children:h.jsx("span",{className:"dsn-segment-control-selector-label",children:t})}),o&&l&&h.jsx("span",{className:"dsn-segment-control-selector-icon","aria-hidden":"true",children:l})]})}function SM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function tf({options:e,value:t,defaultValue:n,onChange:r,fullWidth:i=!0,className:a,"aria-label":s="Segment control"}){const o=_.useMemo(()=>SM(e),[e]),l=t!==void 0,[u,c]=_.useState(n??o),d=l?t:u,[f,g]=_.useState(()=>{const y=e.findIndex(b=>b.value===d);return y>=0?y:0}),p=_.useRef([]);_.useEffect(()=>{!l&&e.every(y=>y.value!==u)&&c(o)},[o,u,l,e]),_.useEffect(()=>{const y=e.findIndex(b=>b.value===d);y>=0&&g(y)},[e,d]);const m=_.useCallback(y=>{const b=e.find(k=>k.value===y);!b||b.disabled||(l||c(y),y!==d&&(r==null||r(y)))},[l,r,e,d]),v=_.useCallback((y,b)=>{var w;if(e.length===0)return;let k=y;for(let S=0;S<e.length;S+=1)if(k=(k+b+e.length)%e.length,!e[k].disabled){const N=e[k];g(k),m(N.value),(w=p.current[k])==null||w.focus();return}},[e,m]),x=["dsn-segment-control",a].filter(Boolean).join(" ");return h.jsx("div",{className:x,role:"radiogroup","aria-label":s,"data-full-width":i,children:e.map((y,b)=>{const k=y.value===d,w=b===f?0:-1,S=`dsn-segment-control-${y.value}`;return h.jsx(kM,{id:S,label:y.label,active:k,disabled:!!y.disabled,tabIndex:w,showLeadingIcon:y.showLeadingIcon,leadingIcon:y.leadingIcon,showTrailingIcon:y.showTrailingIcon,trailingIcon:y.trailingIcon,ariaLabel:y["aria-label"],buttonRef:N=>{p.current[b]=N},onSelect:()=>m(y.value),onFocus:()=>g(b),onKeyDown:N=>{if(N.key==="ArrowRight"||N.key==="ArrowDown"){N.preventDefault(),v(b,1);return}if(N.key==="ArrowLeft"||N.key==="ArrowUp"){N.preventDefault(),v(b,-1);return}(N.key===" "||N.key==="Enter")&&(N.preventDefault(),m(y.value))}},y.value)})})}function nf(e,t){const n=t==="sm"?"sm":"md";return _.Children.map(e,r=>{if(!_.isValidElement(r))return r;const i=nf(r.props.children,t);if(r.type===we){const a=r.props.variant,s=a==="plain"?"secondary":a??"primary";return _.cloneElement(r,{variant:s,size:n,children:i})}return _.cloneElement(r,{children:i})})}function Da({size:e="lg",leftActions:t,rightActions:n,className:r,"aria-label":i="Toolbar"}){const a=["dsn-toolbar",r].filter(Boolean).join(" "),s=nf(t,e),o=nf(n,e);return h.jsxs("div",{className:a,"data-size":e,role:"toolbar","aria-label":i,children:[h.jsx("div",{className:"dsn-toolbar-side dsn-toolbar-side-left",children:s}),h.jsx("div",{className:"dsn-toolbar-side dsn-toolbar-side-right",children:o})]})}const NM=["S","M","T","W","T","F","S"],EM=["07:00","08:00","09:00","10:00","11:00","12:00","01:00","02:00","03:00","04:00","05:00","06:00"];function TM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M9.5 4.5L6 8L9.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function CM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M6.5 4.5L10 8L6.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function rf(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M5.33333 2V4M10.6667 2V4M2.66667 6H13.3333M4 3.33333H12C12.7364 3.33333 13.3333 3.93029 13.3333 4.66667V12C13.3333 12.7364 12.7364 13.3333 12 13.3333H4C3.26362 13.3333 2.66667 12.7364 2.66667 12V4.66667C2.66667 3.93029 3.26362 3.33333 4 3.33333Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function MM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M11.5 4.5L4.5 11.5M4.5 4.5L11.5 11.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function zr(e){return new Date(e.getFullYear(),e.getMonth(),e.getDate())}function Xs(e,t){return!e||!t?!1:e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()&&e.getDate()===t.getDate()}function Yy(e){return`${e.getFullYear()}-${e.getMonth()}-${e.getDate()}`}function Ui(e){const t=String(e.getMonth()+1).padStart(2,"0"),n=String(e.getDate()).padStart(2,"0"),r=String(e.getFullYear());return`${t}-${n}-${r}`}function jM(e,t,n){return`${Ui(e)} ${t} ${n}`}function OM(e){return e.toLocaleDateString("en-US",{weekday:"long",day:"numeric",month:"long",year:"numeric"})}function $M(e){const r=(e.trim().split(/\s+/)[0]??"").match(/^(\d{1,2})[-/](\d{1,2})[-/](\d{4})$/);if(!r)return null;const i=Number(r[1]),a=Number(r[2]),s=Number(r[3]),o=new Date(s,i-1,a);return o.getFullYear()!==s||o.getMonth()!==i-1||o.getDate()!==a?null:zr(o)}function li(e){return new Date(e.getFullYear(),e.getMonth(),1)}function Zl(e,t){return new Date(e.getFullYear(),e.getMonth()+t,1)}function bn(e,t){const n=new Date(e);return n.setDate(n.getDate()+t),zr(n)}function PM(e){return e.toLocaleDateString("en-US",{month:"short"})}function AM(e){const t=li(e),n=t.getDay(),r=bn(t,-n);return Array.from({length:42},(i,a)=>bn(r,a))}function LM(e){return!e||e instanceof Date?{start:null,end:null}:{start:e.start?zr(e.start):null,end:e.end?zr(e.end):null}}function DM(e){return!e||!(e instanceof Date)?null:zr(e)}function IM(e,t,n){if(!t||!n)return!1;const r=e.getTime();return r>t.getTime()&&r<n.getTime()}function FM({id:e,displayMode:t="popover",selectionMode:n="single",withTime:r=!1,label:i="Date and time",placeholder:a="MM-DD-YYY 00:00 AM",startPlaceholder:s="Start date",endPlaceholder:o="End date",value:l,defaultValue:u=null,open:c,defaultOpen:d=!1,disabled:f=!1,required:g=!1,error:p=!1,helperText:m="Help text",errorMessage:v,helperIcon:x,className:y,onChange:b,onOpenChange:k,presets:w,selectedPresetId:S,defaultSelectedPresetId:N=null,onPresetSelect:E,showActions:T=!0,cancelLabel:C="Cancel",confirmLabel:O="Confirm",onCancel:$,onConfirm:M,"aria-label":j,"aria-labelledby":P}){const F=_.useId(),B=e??`dsn-date-time-picker-${F}`,W=`${B}-label`,q=`${B}-helper`,D=`${B}-dialog`,A=n==="range",U=t==="popover",Y=p&&v?v:m,G=c!==void 0,[J,R]=_.useState(d),K=G?c:J,Z=l!==void 0,[z,X]=_.useState(u),H=Z?l:z,I=DM(H),ne=LM(H),ue=_.useMemo(()=>I?li(I):ne.start?li(ne.start):li(new Date),[ne.start,I]),[ye,fe]=_.useState(ue),xe=_.useMemo(()=>{const te=zr(new Date),Ge=bn(te,-1);if(A){const ot=bn(te,-4);return[{id:"today",label:"Today",value:{start:te,end:te}},{id:"yesterday",label:"Yesterday",value:{start:Ge,end:Ge}},{id:"last-week",label:"Last week",value:{start:ot,end:te}},{id:"last-month",label:"Last month",value:{start:bn(te,-30),end:te}},{id:"last-year",label:"Last year",value:{start:bn(te,-365),end:te}}]}return[{id:"today",label:"Today",value:te},{id:"yesterday",label:"Yesterday",value:Ge},{id:"last-friday",label:"Last Friday",value:bn(te,-2)}]},[A]),Se=w??xe,We=T,Ze=S!==void 0,[Nt,Ve]=_.useState(N),Qe=Ze?S??null:Nt,[mt,ht]=_.useState(zr(new Date)),[vt,Le]=_.useState(null),[Et,Tt]=_.useState("07:00"),[at,fr]=_.useState("AM"),[Mn,Ut]=_.useState(I?Ui(I):""),[me,Ie]=_.useState(ne.start?Ui(ne.start):""),[Ct,bt]=_.useState(ne.end?Ui(ne.end):""),re=_.useRef(null),ve=_.useRef(null),ge=_.useRef(null),Ne=_.useRef({}),pt=A&&ne.start?Ui(ne.start):"",Mt=A&&ne.end?Ui(ne.end):"",un=!A&&I?r?jM(I,Et,at):Ui(I):"",Oa=_.useMemo(()=>AM(ye),[ye]),jt=te=>{G||R(te),k==null||k(te)},st=te=>{Z||X(te),b==null||b(te)},Jt=te=>{const Ge=Yy(te),ot=Ne.current[Ge];ot&&ot.focus()},jn=(te,Ge)=>{const ot=$M(te);if(!ot)return;if(Ge==="single"){st(ot),fe(li(ot)),ht(ot);return}const pr=Ge==="range-start"?ot:ne.start,L=Ge==="range-end"?ot:ne.end;if(pr&&L&&pr.getTime()>L.getTime()){st({start:L,end:pr}),fe(li(L)),ht(L);return}st({start:pr??null,end:L??null}),fe(li(ot)),ht(ot)},Yn=te=>{Ze||Ve(te.id),E==null||E(te.id),st(te.value)},Ht=te=>{if(Le(null),!A){st(te),ht(te),!r&&!We&&U&&jt(!1);return}const{start:Ge,end:ot}=ne;if(!Ge||Ge&&ot){st({start:te,end:null}),ht(te);return}te.getTime()<Ge.getTime()?(st({start:te,end:Ge}),ht(te)):(st({start:Ge,end:te}),ht(te)),!r&&!We&&U&&jt(!1)};_.useEffect(()=>{if(!K)return;const te=A?ne.start??mt:I??mt;Xs(te,mt)||ht(te);const Ge=setTimeout(()=>Jt(te),0);return()=>clearTimeout(Ge)},[mt,K,A,ne.start,I]),_.useEffect(()=>{const te=Ge=>{!re.current||!K||re.current.contains(Ge.target)||jt(!1)};return document.addEventListener("mousedown",te),()=>document.removeEventListener("mousedown",te)},[K]),_.useEffect(()=>{A||Ut(un)},[A,un]),_.useEffect(()=>{(!A||!K||ne.end)&&Le(null)},[K,A,ne.end]),_.useEffect(()=>{A&&(Ie(pt),bt(Mt))},[Mt,A,pt]);const hr=h.jsxs("div",{className:"dsn-date-time-picker-panel",children:[h.jsxs("div",{className:"dsn-date-time-picker-calendar-header",children:[h.jsx("button",{type:"button",className:"dsn-date-time-picker-nav-button","aria-label":"Previous month",onClick:()=>fe(te=>Zl(te,-1)),children:h.jsx(TM,{})}),h.jsxs("div",{className:"dsn-date-time-picker-calendar-title-wrap",children:[h.jsx("span",{className:"dsn-date-time-picker-calendar-title",children:PM(ye)}),h.jsx("span",{className:"dsn-date-time-picker-calendar-title",children:ye.getFullYear()})]}),h.jsx("button",{type:"button",className:"dsn-date-time-picker-nav-button","aria-label":"Next month",onClick:()=>fe(te=>Zl(te,1)),children:h.jsx(CM,{})})]}),h.jsx("div",{className:"dsn-date-time-picker-weekday-row",children:NM.map((te,Ge)=>h.jsx("span",{className:"dsn-date-time-picker-weekday",children:te},`${te}-${Ge}`))}),h.jsx("div",{className:"dsn-date-time-picker-days-grid",role:"grid","aria-label":"Calendar",onMouseLeave:()=>Le(null),children:Oa.map(te=>{const Ge=te.getMonth()===ye.getMonth(),ot=A&&!!(ne.start&&!ne.end&&vt),pr=ot&&ne.start&&vt?vt.getTime()<ne.start.getTime()?vt:ne.start:null,L=ot&&ne.start&&vt?vt.getTime()<ne.start.getTime()?ne.start:vt:null,oe=A?ne.end?ne.start:pr??ne.start:I,he=A?ne.end??L:null,ke=Xs(te,oe),Fe=A&&Xs(te,he),Ke=ke||Fe,De=A&&IM(te,oe,he),Ae=A&&!!(oe&&he&&te.getTime()>=oe.getTime()&&te.getTime()<=he.getTime()),qt=Xs(te,zr(new Date)),dt=Xs(te,mt),ft=Yy(te);return h.jsx("button",{ref:Xe=>{Ne.current[ft]=Xe},type:"button",role:"gridcell",className:"dsn-date-time-picker-day","data-selected":Ke||void 0,"data-in-range":De||void 0,"data-within-range":Ae||void 0,"data-range-start":A&&ke?!0:void 0,"data-range-end":A&&Fe?!0:void 0,"data-today":qt||void 0,"data-outside-month":!Ge||void 0,"aria-selected":Ke,"aria-label":OM(te),tabIndex:dt?0:-1,onClick:()=>Ht(te),onFocus:()=>ht(te),onMouseEnter:()=>{A&&ne.start&&!ne.end&&Le(te)},onKeyDown:Xe=>{var Lr;let Vt=null;if(Xe.key==="ArrowRight"&&(Vt=bn(te,1)),Xe.key==="ArrowLeft"&&(Vt=bn(te,-1)),Xe.key==="ArrowDown"&&(Vt=bn(te,7)),Xe.key==="ArrowUp"&&(Vt=bn(te,-7)),Xe.key==="Home"&&(Vt=bn(te,-te.getDay())),Xe.key==="End"&&(Vt=bn(te,6-te.getDay())),Xe.key==="PageUp"){const ut=Zl(te,-1);Vt=new Date(ut.getFullYear(),ut.getMonth(),te.getDate())}if(Xe.key==="PageDown"){const ut=Zl(te,1);Vt=new Date(ut.getFullYear(),ut.getMonth(),te.getDate())}if(Vt){Xe.preventDefault();const ut=zr(Vt);ht(ut),fe(li(ut)),setTimeout(()=>Jt(ut),0);return}if(Xe.key==="Enter"||Xe.key===" "){Xe.preventDefault(),Ht(te);return}Xe.key==="Escape"&&(Xe.preventDefault(),jt(!1),(Lr=ve.current)==null||Lr.focus())},children:h.jsx("span",{className:"dsn-date-time-picker-day-inner",children:te.getDate()})},ft)})}),r&&h.jsxs("div",{className:"dsn-date-time-picker-time-bar",children:[h.jsx("div",{className:"dsn-date-time-picker-time-hour",children:h.jsx(Ky,{label:"Hour",showLabel:!1,showHelper:!1,placeholder:"07:00",helperText:"",selectionMode:"single",defaultValue:Et,options:EM.map(te=>({value:te,label:te})),onChange:te=>Tt(te),onInputChange:te=>Tt(te),"aria-label":"Select time"})}),h.jsx("div",{className:"dsn-date-time-picker-time-meridiem",children:h.jsx(tf,{fullWidth:!1,"aria-label":"Select meridiem",value:at,onChange:fr,options:[{value:"AM",label:"AM"},{value:"PM",label:"PM"}]})})]})]});return U?h.jsxs("div",{ref:re,className:["dsn-date-time-picker",y].filter(Boolean).join(" "),"data-error":p||void 0,"data-disabled":f||void 0,"data-open":K||void 0,children:[!A&&h.jsxs("label",{id:W,className:"dsn-date-time-picker-label",htmlFor:`${B}-single`,children:[i,g&&h.jsxs("span",{className:"dsn-date-time-picker-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsxs("div",{ref:ge,className:"dsn-date-time-picker-control-wrap",children:[!A&&h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(rf,{})}),h.jsx("input",{ref:ve,id:`${B}-single`,className:"dsn-date-time-picker-control-input",placeholder:a,value:Mn,onChange:te=>Ut(te.target.value),disabled:f,"aria-label":j,"aria-labelledby":P??W,"aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":Y?q:void 0,"aria-haspopup":"dialog","aria-expanded":K,"aria-controls":K?D:void 0,onFocus:()=>{f||jt(!0)},onClick:()=>{f||jt(!0)},onKeyDown:te=>{(te.key==="ArrowDown"||te.key==="Enter")&&(te.preventDefault(),jt(!0)),te.key==="Escape"&&jt(!1)},onBlur:te=>jn(te.target.value,"single")}),Mn&&!f&&h.jsx("button",{type:"button",className:"dsn-date-time-picker-clear-button","aria-label":"Clear date value",onClick:()=>{var te;Ut(""),st(null),jt(!1),(te=ve.current)==null||te.focus()},children:h.jsx(MM,{})})]}),A&&h.jsxs("div",{className:"dsn-date-time-picker-range-fields",children:[h.jsxs("div",{className:"dsn-date-time-picker-range-field",children:[h.jsx("label",{className:"dsn-date-time-picker-range-field-label",htmlFor:`${B}-start`,children:"Start"}),h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(rf,{})}),h.jsx("input",{ref:ve,id:`${B}-start`,className:"dsn-date-time-picker-control-input",placeholder:s,value:me,onChange:te=>Ie(te.target.value),disabled:f,"aria-label":j??"Start date","aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":Y?q:void 0,"aria-haspopup":"dialog","aria-expanded":K,"aria-controls":K?D:void 0,onFocus:()=>{f||jt(!0)},onClick:()=>{f||jt(!0)},onBlur:te=>jn(te.target.value,"range-start")})]})]}),h.jsxs("div",{className:"dsn-date-time-picker-range-field",children:[h.jsx("label",{className:"dsn-date-time-picker-range-field-label",htmlFor:`${B}-end`,children:"End"}),h.jsxs("div",{className:"dsn-date-time-picker-control",children:[h.jsx("span",{className:"dsn-date-time-picker-leading-icon","aria-hidden":"true",children:h.jsx(rf,{})}),h.jsx("input",{id:`${B}-end`,className:"dsn-date-time-picker-control-input",placeholder:o,value:Ct,onChange:te=>bt(te.target.value),disabled:f,"aria-label":"End date","aria-required":g||void 0,"aria-invalid":p||void 0,"aria-describedby":Y?q:void 0,onFocus:()=>{f||jt(!0)},onClick:()=>{f||jt(!0)},onBlur:te=>jn(te.target.value,"range-end")})]})]})]}),K&&!f&&h.jsx(Fr,{role:"dialog","aria-label":A?"Choose date range":"Choose date",className:"dsn-date-time-picker-popover",contentClassName:"dsn-date-time-picker-popover-content",contentPadding:"none",anchorRef:ge,width:320,matchAnchorWidth:!1,minWidth:192,segment:Se.length>0?h.jsx("div",{className:"dsn-date-time-picker-presets",children:h.jsx(Xl,{label:"Date shortcuts",children:Se.map(te=>h.jsx(Gs,{size:"md",label:te.label,showLeadingIcon:!1,showTrailingIcon:!1,selected:Qe===te.id,onClick:()=>Yn(te)},te.id))})}):void 0,content:h.jsx("div",{id:D,children:hr}),bottomBar:We?h.jsx(Da,{size:"md",leftActions:null,rightActions:h.jsxs(Fi,{size:"md",spaceBetween:!0,"aria-label":"Date picker actions",children:[h.jsx(we,{variant:"ghost",size:"md",onClick:()=>{$==null||$(),jt(!1)},children:C}),h.jsx(we,{variant:"primary",size:"md",onClick:()=>{M==null||M(H??null),jt(!1)},children:O})]})}):void 0})]}),Y&&h.jsxs("div",{className:"dsn-date-time-picker-meta",children:[x&&h.jsx("span",{className:"dsn-date-time-picker-meta-icon",children:x}),h.jsx("p",{id:q,className:"dsn-date-time-picker-helper",children:Y})]})]}):h.jsxs("div",{ref:re,className:["dsn-date-time-picker",y].filter(Boolean).join(" "),"data-error":p||void 0,"data-disabled":f||void 0,children:[i&&h.jsx("p",{id:W,className:"dsn-date-time-picker-label",children:i}),Se.length>0&&h.jsx("div",{className:"dsn-date-time-picker-presets",children:h.jsx(Xl,{label:"Quick date presets",children:Se.map(te=>h.jsx(Gs,{size:"md",label:te.label,showLeadingIcon:!1,showTrailingIcon:!1,selected:Qe===te.id,onClick:()=>Yn(te)},te.id))})}),h.jsx("div",{role:"dialog","aria-label":A?"Choose date range":"Choose date",children:hr}),Y&&h.jsxs("div",{className:"dsn-date-time-picker-meta",children:[x&&h.jsx("span",{className:"dsn-date-time-picker-meta-icon",children:x}),h.jsx("p",{id:q,className:"dsn-date-time-picker-helper",children:Y})]})]})}function zM(){return h.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M16 16L12 12M12 12L8 16M12 12V20M20.39 18.39C21.3655 17.8573 22.1359 17.0176 22.5789 16.0004C23.0218 14.9833 23.1125 13.8474 22.836 12.7737C22.5595 11.7 21.9317 10.7502 21.051 10.0757C20.1703 9.40118 19.0898 9.0399 17.98 9.05H16.72C16.4176 7.88024 15.854 6.79419 15.0709 5.87368C14.2878 4.95316 13.3058 4.22212 12.1998 3.73454C11.0938 3.24696 9.89114 3.01595 8.68219 3.05892C7.47325 3.10189 6.29018 3.41772 5.22287 3.98282C4.15556 4.54793 3.23226 5.3472 2.52208 6.32053C1.81191 7.29386 1.33398 8.41797 1.12408 9.605C0.914179 10.792 0.977588 12.0116 1.30956 13.1704C1.64154 14.3292 2.23322 15.3974 3.03999 16.29",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})}function RM({id:e,label:t="Label",helperText:n="Help text",helperIcon:r,disabled:i=!1,accept:a,multiple:s=!1,maxSizeText:o="Up to 100Mb",dragText:l="Drag and drop or press to upload",dropText:u="Drop here",onFilesSelected:c,onFocus:d,onBlur:f,className:g,"aria-label":p}){const m=_.useId(),v=e??`dsn-upload-area-${m}`,x=`${v}-label`,y=`${v}-helper`,b=_.useRef(null),[k,w]=_.useState(!1);function S(){var E;i||(E=b.current)==null||E.click()}function N(E){!E||E.length===0||c==null||c(Array.from(E))}return h.jsxs("div",{className:["dsn-upload-area",g].filter(Boolean).join(" "),children:[t&&h.jsx("p",{className:"dsn-upload-area-label",id:x,children:t}),h.jsxs("button",{id:v,type:"button",className:"dsn-upload-area-zone","data-disabled":i||void 0,"data-dragging":k||void 0,disabled:i,"aria-label":p??"Upload files - click or drag and drop","aria-labelledby":t?x:void 0,"aria-describedby":n?y:void 0,onClick:S,onFocus:d,onBlur:f,onDragOver:E=>{E.preventDefault(),i||w(!0)},onDragLeave:E=>{E.preventDefault(),w(!1)},onDrop:E=>{E.preventDefault(),w(!1),i||N(E.dataTransfer.files)},children:[h.jsx("span",{className:"dsn-upload-area-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-upload-area-icon",children:h.jsx(zM,{})})}),h.jsx("span",{className:"dsn-upload-area-label-wrap",children:h.jsx("span",{className:"dsn-upload-area-main-text",children:k&&!i?u:l})}),!k&&h.jsx("span",{className:"dsn-upload-area-size-text",children:o})]}),h.jsx("input",{ref:b,type:"file",className:"dsn-upload-area-native",accept:a,multiple:s,disabled:i,onChange:E=>N(E.target.files)}),n&&h.jsxs("div",{className:"dsn-upload-area-meta",children:[r&&h.jsx("span",{className:"dsn-upload-area-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-upload-area-meta-icon",children:r})}),h.jsx("p",{id:y,className:"dsn-upload-area-helper",children:n})]})]})}function af(e){if(e==null||typeof e=="boolean")return null;if(typeof e=="string"||typeof e=="number")return e;if(Array.isArray(e)){const t=e.map(n=>af(n)).filter(n=>n!==null);return t.length>0?t:null}return _.isValidElement(e)?e:null}function Rr({title:e,description:t,size:n="medium",leadingControl:r,trailingControl:i,className:a}){const s=["dsn-section-header",a].filter(Boolean).join(" "),o=af(r),l=af(i);return h.jsxs("div",{className:s,"data-size":n,"data-has-description":!!t||void 0,"data-has-leading-control":!!o||void 0,"data-has-trailing-control":!!l||void 0,children:[o&&h.jsx("div",{className:"dsn-section-header-control",children:o}),h.jsx("div",{className:"dsn-section-header-title-wrapper",children:h.jsxs("div",{className:"dsn-section-header-text",children:[h.jsx("p",{className:"dsn-section-header-title",children:e}),t&&h.jsx("p",{className:"dsn-section-header-description",children:t})]})}),l&&h.jsx("div",{className:"dsn-section-header-control",children:l})]})}function BM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function WM({tabs:e,value:t,defaultValue:n,onChange:r,className:i,showPanels:a=!0,panelClassName:s,"aria-label":o="Tabs"}){const l=_.useMemo(()=>BM(e),[e]),u=t!==void 0,[c,d]=_.useState(n??l),f=u?t:c,g=_.useRef([]);_.useEffect(()=>{!u&&e.every(b=>b.value!==c)&&d(l)},[l,c,u,e]);const p=_.useCallback(b=>{const k=e.find(w=>w.value===b);!k||k.disabled||(u||d(b),b!==f&&(r==null||r(b)))},[u,r,f,e]),m=_.useCallback((b,k)=>{if(e.length===0)return-1;let w=b;for(let S=0;S<e.length;S+=1)if(w=(w+k+e.length)%e.length,!e[w].disabled)return w;return-1},[e]),v=_.useCallback(b=>{var k;b<0||(k=g.current[b])==null||k.focus()},[]),x=["dsn-tab",i].filter(Boolean).join(" "),y=["dsn-tab-panel",s].filter(Boolean).join(" ");return h.jsxs("div",{className:x,children:[h.jsx("div",{className:"dsn-tab-list",role:"tablist","aria-label":o,children:e.map((b,k)=>{const w=b.value===f,S=!!b.disabled,N=`dsn-tab-${b.value}`,E=`dsn-tabpanel-${b.value}`,T=w?0:-1;return h.jsx("button",{ref:C=>{g.current[k]=C},className:"dsn-tab-trigger",type:"button",role:"tab",id:N,"aria-controls":E,"aria-selected":w,"aria-label":b["aria-label"],"aria-disabled":S||void 0,disabled:S,"data-selected":w||void 0,tabIndex:T,onClick:()=>p(b.value),onKeyDown:C=>{if(C.key==="ArrowRight"){C.preventDefault();const O=m(k,1);v(O);return}if(C.key==="ArrowLeft"){C.preventDefault();const O=m(k,-1);v(O);return}if(C.key==="Home"){C.preventDefault();const O=e.findIndex($=>!$.disabled);v(O);return}if(C.key==="End"){C.preventDefault();const O=[...e].reverse().findIndex(M=>!M.disabled),$=O<0?-1:e.length-1-O;v($);return}(C.key===" "||C.key==="Enter")&&(C.preventDefault(),p(b.value))},children:h.jsxs("span",{className:"dsn-tab-trigger-content",children:[b.showLeadingIcon&&h.jsx("span",{className:"dsn-tab-icon-wrap","aria-hidden":"true",children:b.leadingIcon}),h.jsx("span",{className:"dsn-tab-label-wrap",children:h.jsx("span",{className:"dsn-tab-label",children:b.label})}),b.showTrailingIcon&&h.jsx("span",{className:"dsn-tab-icon-wrap","aria-hidden":"true",children:b.trailingIcon})]})},b.value)})}),a&&e.map(b=>{const k=`dsn-tabpanel-${b.value}`,w=`dsn-tab-${b.value}`,S=b.value===f;return h.jsx("div",{className:y,role:"tabpanel",id:k,"aria-labelledby":w,hidden:!S,children:b.panel},b.value)})]})}function UM(e){var n;return((n=e.find(r=>!r.disabled)??e[0])==null?void 0:n.value)??""}function Gy({tabs:e,value:t,defaultValue:n,onChange:r,onRemove:i,addActionLabel:a,addActionLeadingIcon:s,onAddAction:o,addActionAriaLabel:l,className:u,showPanels:c=!0,panelClassName:d,"aria-label":f="Custom views"}){const g=_.useMemo(()=>UM(e),[e]),p=t!==void 0,[m,v]=_.useState(n??g),x=p?t:m,y=_.useRef([]);_.useEffect(()=>{!p&&e.every(E=>E.value!==m)&&v(g)},[g,m,p,e]);const b=_.useCallback(E=>{const T=e.find(C=>C.value===E);!T||T.disabled||(p||v(E),E!==x&&(r==null||r(E)))},[p,r,x,e]),k=_.useCallback((E,T)=>{if(e.length===0)return-1;let C=E;for(let O=0;O<e.length;O+=1)if(C=(C+T+e.length)%e.length,!e[C].disabled)return C;return-1},[e]),w=_.useCallback(E=>{var T;E<0||(T=y.current[E])==null||T.focus()},[]),S=["dsn-custom-view-tabs",u].filter(Boolean).join(" "),N=["dsn-custom-view-tabs-panel",d].filter(Boolean).join(" ");return h.jsxs("div",{className:S,children:[h.jsxs("div",{className:"dsn-custom-view-tabs-list",role:"tablist","aria-label":f,children:[e.map((E,T)=>{const C=E.value===x,O=!!E.disabled,$=E.removable!==!1,M=E.showLeadingIcon!==!1,j=`dsn-custom-tab-${E.value}`,P=`dsn-custom-tabpanel-${E.value}`,F=C?0:-1;return h.jsxs("div",{className:"dsn-custom-view-tabs-item",ref:B=>{y.current[T]=B},role:"tab",id:j,"aria-controls":P,"aria-selected":C,"aria-label":E["aria-label"],"aria-disabled":O||void 0,"data-selected":C||void 0,"data-disabled":O||void 0,tabIndex:O?-1:F,onClick:()=>{O||b(E.value)},onKeyDown:B=>{if(!O){if(B.key==="ArrowRight"){B.preventDefault();const W=k(T,1);w(W);return}if(B.key==="ArrowLeft"){B.preventDefault();const W=k(T,-1);w(W);return}if(B.key==="Home"){B.preventDefault();const W=e.findIndex(q=>!q.disabled);w(W);return}if(B.key==="End"){B.preventDefault();const W=[...e].reverse().findIndex(D=>!D.disabled),q=W<0?-1:e.length-1-W;w(q);return}(B.key===" "||B.key==="Enter")&&(B.preventDefault(),b(E.value))}},children:[M&&h.jsx("span",{className:"dsn-custom-view-tabs-icon","data-icon":E.leadingIcon?"custom":"default","aria-hidden":"true",children:E.leadingIcon}),h.jsx("span",{className:"dsn-custom-view-tabs-label-wrap",children:h.jsx("span",{className:"dsn-custom-view-tabs-label",children:E.label})}),$&&h.jsx(we,{className:"dsn-custom-view-tabs-remove",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Dr,{size:16,"aria-hidden":"true"}),"aria-label":E.removeAriaLabel??`Remove ${E.label}`,disabled:O,onClick:B=>{B.stopPropagation(),B.preventDefault(),i==null||i(E.value)}})]},E.value)}),a&&h.jsx("span",{className:"dsn-custom-view-tabs-add-wrap",children:h.jsx(we,{className:"dsn-custom-view-tabs-add-button",variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:s??h.jsx(EC,{size:16,"aria-hidden":"true"}),"aria-label":l??a,onClick:o,children:a})})]}),c&&e.map(E=>{const T=`dsn-custom-tabpanel-${E.value}`,C=`dsn-custom-tab-${E.value}`,O=E.value===x;return h.jsx("div",{className:N,role:"tabpanel",id:T,"aria-labelledby":C,hidden:!O,children:E.panel},E.value)})]})}const HM=Gy;function qM(e){return e==="none"?"asc":e==="asc"?"desc":"none"}function VM(e){return e==="asc"?"ascending":e==="desc"?"descending":"none"}function Xy({variant:e="title",state:t="default",label:n="Label",width:r,sortable:i=!1,sortDirection:a="none",reorderable:s=!0,resizable:o=!0,checkboxChecked:l=!1,checkboxIndeterminate:u=!1,onCheckboxChange:c,onSortChange:d,onReorderCommand:f,onResizeCommand:g,onResizePointerDown:p,onReorderDragStart:m,onReorderDragEnd:v,leadingAccessory:x,className:y,"aria-label":b}){const k=["dsn-data-table-header-cell",y].filter(Boolean).join(" "),w=e==="title",S=w&&i,N=()=>{S&&(d==null||d(qM(a)))},E=C=>{S&&(C.key==="Enter"||C.key===" ")&&(C.preventDefault(),N())},T=w&&typeof r=="number"?{width:`${r}px`}:void 0;return h.jsx("div",{className:k,"data-variant":e,"data-state":t,role:"columnheader","aria-sort":w&&i?VM(a):void 0,"aria-label":b,style:T,tabIndex:S?0:-1,onClick:N,onKeyDown:E,children:w?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dsn-data-table-header-cell-main",children:[x&&h.jsx("span",{className:"dsn-data-table-header-cell-leading-accessory",onClick:C=>C.stopPropagation(),children:x}),h.jsxs("div",{className:"dsn-data-table-header-cell-title",children:[h.jsx("span",{className:"dsn-data-table-header-cell-label",children:n}),i&&h.jsxs("span",{className:"dsn-data-table-header-cell-sort","aria-hidden":"true",children:[a==="asc"&&"↑",a==="desc"&&"↓",a==="none"&&"↕"]})]})]}),h.jsxs("div",{className:"dsn-data-table-header-cell-controls",children:[s&&h.jsx("button",{type:"button",className:"dsn-data-table-header-handle","aria-label":"Reorder column",draggable:!0,onClick:C=>C.stopPropagation(),onDragStart:m,onDragEnd:v,onKeyDown:C=>{C.stopPropagation(),C.key==="ArrowLeft"?(C.preventDefault(),f==null||f("left")):C.key==="ArrowRight"&&(C.preventDefault(),f==null||f("right"))},children:"⋮⋮"}),o&&h.jsx("button",{type:"button",className:"dsn-data-table-header-resizer","aria-label":"Resize column",onClick:C=>C.stopPropagation(),onPointerDown:C=>{C.stopPropagation(),p==null||p(C)},onKeyDown:C=>{C.stopPropagation(),C.key==="ArrowLeft"?(C.preventDefault(),g==null||g("decrease")):C.key==="ArrowRight"&&(C.preventDefault(),g==null||g("increase"))}})]})]}):h.jsx("div",{className:"dsn-data-table-header-cell-checkbox-wrap",onClick:C=>C.stopPropagation(),children:h.jsx(Xn,{size:"sm",checked:l,indeterminate:u,showContent:!1,"aria-label":b??"Select all rows",onCheckedChange:c})})})}function KM({values:e}){const t=_.useRef(null),n=_.useRef(null),r=_.useRef(null),i=_.useRef(null),a=_.useRef(null),[s,o]=_.useState(e.length),[l,u]=_.useState(!1),c=Math.max(0,e.length-s),d=_.useCallback(()=>{const f=t.current,g=n.current,p=r.current;if(!f||!g)return;const m=f.clientWidth;if(m<=0)return;const x=Array.from(g.querySelectorAll("[data-measure-tag]")).map(S=>S.getBoundingClientRect().width),y=Number.parseFloat(window.getComputedStyle(f).columnGap||"0")||0,b=(p==null?void 0:p.getBoundingClientRect().width)??0;let k=0,w=0;for(let S=0;S<x.length;S+=1){const N=k+(w>0?y:0)+x[S],T=x.length-(S+1)>0?(w>=0?y:0)+b:0;if(N+T<=m)k=N,w+=1;else break}o(w)},[]);return _.useEffect(()=>{o(e.length)},[e]),_.useEffect(()=>{d()},[d,e]),_.useEffect(()=>{c===0&&l&&u(!1)},[l,c]),_.useEffect(()=>{const f=t.current;if(!f||typeof ResizeObserver>"u")return;const g=new ResizeObserver(()=>d());return g.observe(f),()=>g.disconnect()},[d]),_.useEffect(()=>{if(!l)return;const f=p=>{p.key==="Escape"&&u(!1)},g=p=>{const m=p.target,v=i.current,x=a.current;v!=null&&v.contains(m)||x!=null&&x.contains(m)||u(!1)};return window.addEventListener("keydown",f),window.addEventListener("mousedown",g),()=>{window.removeEventListener("keydown",f),window.removeEventListener("mousedown",g)}},[l]),h.jsxs(h.Fragment,{children:[h.jsxs("span",{className:"dsn-data-table-cell-tags",ref:t,children:[e.slice(0,s).map((f,g)=>h.jsx(Ir,{size:"sm",variant:"highlight",label:f,showIcon:!1},`${f}-${g}`)),c>0&&h.jsx("button",{ref:i,type:"button",className:"dsn-data-table-cell-tags-overflow-trigger","aria-label":`Show ${c} more tags`,"aria-haspopup":"dialog","aria-expanded":l,onClick:f=>{f.stopPropagation(),u(g=>!g)},children:h.jsx(Ir,{size:"sm",variant:"neutral",label:`+${c}`,showIcon:!1})})]}),h.jsxs("span",{className:"dsn-data-table-cell-tags-measure",ref:n,"aria-hidden":"true",children:[e.map((f,g)=>h.jsx("span",{"data-measure-tag":!0,children:h.jsx(Ir,{size:"sm",variant:"highlight",label:f,showIcon:!1})},`${f}-${g}`)),h.jsx("span",{ref:r,children:h.jsx(Ir,{size:"sm",variant:"neutral",label:`+${e.length}`,showIcon:!1})})]}),l&&c>0&&h.jsx("div",{className:"dsn-data-table-cell-tags-popover",ref:a,children:h.jsx(Fr,{anchorRef:i,role:"dialog","aria-label":"Hidden tags",width:280,contentPadding:"small",content:h.jsx("div",{className:"dsn-data-table-cell-tags-popover-content",children:e.map((f,g)=>h.jsx(Ir,{size:"sm",variant:"highlight",label:f,showIcon:!1},`${f}-${g}`))})})})]})}function YM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6 6.5H3.5V12.5H9.5V10",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M6.5 3.5H12.5V9.5H6.5V3.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function GM(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M3 11.5L5 11L11.5 4.5L10 3L3.5 9.5L3 11.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function Jy(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M5.5 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M8 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M10.5 5.5V11",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M3.5 4H12.5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M5 4V3.5C5 3.22 5.22 3 5.5 3H10.5C10.78 3 11 3.22 11 3.5V4",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M4.5 4L5 12.5H11L11.5 4",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})]})}function XM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("rect",{x:"3",y:"4.5",width:"10",height:"8.5",rx:"1.5",stroke:"currentColor",strokeWidth:"1.25"}),h.jsx("path",{d:"M3 7H13",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M5.5 3V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"}),h.jsx("path",{d:"M10.5 3V5",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round"})]})}function JM(e,t,n){switch(e){case"number":return h.jsx("span",{children:typeof t=="number"?t.toLocaleString():t??""});case"date":return h.jsx("span",{children:String(t??"")});case"tag":{const i=(Array.isArray(t)?t:t!=null?[t]:[]).map(a=>String(a));return h.jsx(KM,{values:i})}case"user":{const r=t??{name:""};return h.jsxs("span",{className:"dsn-data-table-cell-user",children:[h.jsx(Ri,{size:"xs",variant:"profile",fill:"initials",initials:r.initials??r.name.slice(0,2).toUpperCase(),name:r.name}),h.jsx("span",{children:r.name})]})}case"boolean":return h.jsx(La,{size:"sm",checked:!!t,disabled:!0,"aria-label":t?"True value":"False value"});case"checkbox":return h.jsx(Xn,{size:"sm",checked:!!t,showContent:!1,"aria-label":t?"Selected row":"Unselected row",onCheckedChange:n});case"url":return h.jsx("a",{className:"dsn-data-table-cell-link",href:String(t??"#"),children:String(t??"")});case"empty":return h.jsx("span",{className:"dsn-data-table-cell-empty",children:String(t??"Add [field name]")});case"string":default:return h.jsx("span",{children:String(t??"")})}}function ZM(e){return e==="string"?h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(YM,{}),"aria-label":"Copy cell value"}):e==="number"?h.jsxs(Fi,{size:"sm",spaceBetween:!1,"aria-label":"Number cell actions",children:[h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(GM,{}),"aria-label":"Edit number value"}),h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Jy,{}),"aria-label":"Delete number value"})]}):e==="date"?h.jsxs(Fi,{size:"sm",spaceBetween:!1,"aria-label":"Date cell actions",children:[h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(XM,{}),"aria-label":"Open date picker"}),h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Jy,{}),"aria-label":"Clear date value"})]}):null}function Zy({fieldType:e="string",state:t="default",loading:n=!1,value:r="Label",width:i,onCheckboxChange:a,leadingAccessory:s,align:o="left",className:l,"aria-label":u}){const c=["dsn-data-table-cell",l].filter(Boolean).join(" "),d=t==="hover"&&!n?ZM(e):null,f=typeof i=="number"?{width:`${i}px`}:void 0;return h.jsx("div",{className:c,"data-field-type":e,"data-state":t,"data-loading":n||void 0,"data-align":o,role:"cell","aria-label":u,style:f,children:n?h.jsx("span",{className:"dsn-data-table-cell-skeleton","aria-hidden":"true"}):h.jsxs(h.Fragment,{children:[s&&h.jsx("span",{className:"dsn-data-table-cell-leading-accessory",children:s}),h.jsx("span",{className:"dsn-data-table-cell-content",children:JM(e,r,a)}),d&&h.jsx("span",{className:"dsn-data-table-cell-actions",children:d})]})})}function Qy(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinejoin:"round"})})}function QM(){return h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[h.jsx("path",{d:"M6 6.5H3.5V12.5H9.5V10",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M6.5 3.5H12.5V9.5H6.5V3.5Z",stroke:"currentColor",strokeWidth:"var(--border-width-medium)",strokeLinecap:"round",strokeLinejoin:"round"})]})}function ej({alignment:e="inline",variant:t="with-title",state:n="default",title:r="Title",description:i="Description",content:a,showIcon:s=!0,icon:o,showActions:l=!0,actionAriaLabel:u="Copy description",onActionClick:c,className:d,"aria-label":f}){const g=t==="with-title",p=a!=null,m=["dsn-data-list-cell",d].filter(Boolean).join(" "),v=p?h.jsx("span",{className:"dsn-data-list-cell-interactive-content",children:a}):h.jsx("p",{className:"dsn-data-list-cell-description",children:i});return h.jsxs("div",{className:m,"data-alignment":e,"data-variant":t,"data-state":n,role:"group","aria-label":f,children:[e==="inline"?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dsn-data-list-cell-title-wrapper",children:[s&&h.jsx("span",{className:"dsn-data-list-cell-icon","aria-hidden":"true",children:o??h.jsx(Qy,{})}),g&&h.jsx("p",{className:"dsn-data-list-cell-title",children:r})]}),h.jsx("div",{className:"dsn-data-list-cell-text-block",children:v})]}):h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"dsn-data-list-cell-title-description-wrapper",children:h.jsxs("div",{className:"dsn-data-list-cell-title-wrapper",children:[s&&h.jsx("span",{className:"dsn-data-list-cell-icon","aria-hidden":"true",children:o??h.jsx(Qy,{})}),g&&h.jsx("p",{className:"dsn-data-list-cell-title",children:r})]})}),h.jsx("div",{className:"dsn-data-list-cell-text-block",children:v})]}),l&&h.jsx("span",{className:"dsn-data-list-cell-actions",children:h.jsx(we,{variant:"secondary",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(QM,{}),"aria-label":u,onClick:x=>{x.stopPropagation(),c==null||c(x)}})})]})}function tj(e){if(e.kind==="menu-cell"){const n=e.props??{};return h.jsx(Bi,{variant:e.variant??"default",label:"Label",showLeadingIcon:!0,...n})}if(e.kind==="checkbox-cell"){const n=e.props??{};return h.jsx(Xn,{label:"Label",showLeadingIcon:!0,...n})}const t=e.props??{};return h.jsx(Qd,{label:"Label",showLeadingIcon:!0,...t})}function e0({title:e="Choice list",description:t,sections:n,showHeader:r=!0,showSectionHeaders:i=!0,className:a,sectionClassName:s,enableMenuKeyboardNavigation:o=!1,onMenuEscape:l}){const u=_.useRef(null),c=["dsn-choice-list",a].filter(Boolean).join(" "),d=["dsn-choice-list-section",s].filter(Boolean).join(" "),f=_.useCallback(()=>u.current?Array.from(u.current.querySelectorAll('[role="menuitem"]:not([aria-disabled="true"])')):[],[]),g=_.useCallback(p=>{const m=f();if(m.length===0)return;const v=Math.min(Math.max(p,0),m.length-1);m.forEach((x,y)=>{x.tabIndex=y===v?0:-1})},[f]);return _.useEffect(()=>{o&&g(0)},[o,n,g]),h.jsxs("section",{ref:u,className:c,"aria-label":e,onKeyDown:p=>{var b,k,w,S;if(!o)return;const m=f();if(m.length===0)return;const v=document.activeElement,x=v?m.indexOf(v):-1,y=x>=0?x:0;if(p.key==="ArrowDown"){p.preventDefault();const N=(y+1)%m.length;g(N),(b=m[N])==null||b.focus();return}if(p.key==="ArrowUp"){p.preventDefault();const N=(y-1+m.length)%m.length;g(N),(k=m[N])==null||k.focus();return}if(p.key==="Home"){p.preventDefault(),g(0),(w=m[0])==null||w.focus();return}if(p.key==="End"){p.preventDefault();const N=m.length-1;g(N),(S=m[N])==null||S.focus();return}p.key==="Escape"&&(p.preventDefault(),l==null||l())},children:[r&&h.jsx("header",{className:"dsn-choice-list-header",children:h.jsx(Rr,{title:e,description:t,size:"large"})}),h.jsx("div",{className:"dsn-choice-list-sections",children:n.map(p=>h.jsxs("section",{className:d,"aria-label":p.title,children:[i&&h.jsx(Rr,{title:p.title,size:"small"}),h.jsx("div",{className:"dsn-choice-list-items",children:p.items.map(m=>h.jsx("div",{className:"dsn-choice-list-item",children:tj(m)},m.id))})]},p.id))})]})}function nj({id:e,label:t="Label",checkboxLabel:n="Label",checked:r,defaultChecked:i=!1,disabled:a=!1,helperText:s="Help text",helperIcon:o,error:l=!1,errorMessage:u,required:c=!1,className:d,checkboxProps:f,onCheckedChange:g,"aria-label":p}){const m=_.useId(),x=`${e??`dsn-checkbox-field-${m}`}-helper`,y=r!==void 0,[b,k]=_.useState(i),w=y?r:b,S=l&&u?u:s;function N(E){y||k(E),g==null||g(E)}return h.jsxs("div",{className:["dsn-checkbox-field",d].filter(Boolean).join(" "),"data-error":l||void 0,"data-disabled":a||void 0,children:[h.jsxs("fieldset",{className:"dsn-checkbox-fieldset","aria-label":p,"aria-describedby":S?x:void 0,"aria-invalid":l||void 0,"aria-required":c||void 0,children:[h.jsxs("legend",{className:"dsn-checkbox-field-label",children:[t,c&&h.jsxs("span",{className:"dsn-checkbox-field-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-checkbox-field-control",children:h.jsx(Xn,{className:"dsn-checkbox--full-width",label:n,checked:w,disabled:a,showTrailingIcon:!1,onCheckedChange:N,...f})})]}),S&&h.jsxs("div",{className:"dsn-checkbox-field-meta",children:[o&&h.jsx("span",{className:"dsn-checkbox-field-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-checkbox-field-meta-icon",children:o})}),h.jsx("p",{id:x,className:"dsn-checkbox-field-helper",children:S})]})]})}function rj(){return h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:h.jsx("path",{d:"M8 2.5L13.5 8L8 13.5L2.5 8L8 2.5Z",stroke:"currentColor",strokeWidth:"1.25",strokeLinejoin:"round"})})}function ij({label:e,description:t,showDescription:n=!0,showIcon:r=!1,iconSlot:i,error:a=!1,labelWidth:s,children:o,className:l}){const u=_.useId(),c=`dsn-horizontal-input-label-${u}`,d=`dsn-horizontal-input-description-${u}`,f=n&&!!t,g=i??h.jsx(rj,{}),p={...s?{"--dsn-horizontal-input-label-width":s}:{}};return h.jsx("div",{className:["dsn-horizontal-input",l].filter(Boolean).join(" "),"data-error":a||void 0,"data-has-icon":r||void 0,style:p,children:h.jsxs("div",{className:"dsn-horizontal-input-row",children:[h.jsxs("div",{className:"dsn-horizontal-input-meta",children:[h.jsxs("div",{className:"dsn-horizontal-input-label-row",children:[r&&h.jsx("span",{className:"dsn-horizontal-input-icon","aria-hidden":"true",children:g}),h.jsx("span",{id:c,className:"dsn-horizontal-input-label",children:e})]}),f&&h.jsx("p",{id:d,className:"dsn-horizontal-input-description",children:t})]}),h.jsx("div",{className:"dsn-horizontal-input-content",role:"group","aria-labelledby":c,"aria-describedby":f?d:void 0,children:o})]})})}const aj=Array.from({length:6},(e,t)=>({id:`option-${t+1}`,label:"Label",checked:!1}));function sj({id:e,label:t="Label",options:n=aj,helperText:r="Help text",helperIcon:i,error:a=!1,errorMessage:s,required:o=!1,disabled:l=!1,className:u,onOptionChange:c,"aria-label":d}){const f=_.useId(),p=`${e??`dsn-multi-choice-${f}`}-helper`,m=a&&s?s:r;return h.jsxs("div",{className:["dsn-multi-choice",u].filter(Boolean).join(" "),"data-error":a||void 0,"data-disabled":l||void 0,children:[h.jsxs("fieldset",{className:"dsn-multi-choice-fieldset","aria-label":d,"aria-describedby":m?p:void 0,"aria-invalid":a||void 0,"aria-required":o||void 0,children:[h.jsxs("legend",{className:"dsn-multi-choice-label",children:[t,o&&h.jsxs("span",{className:"dsn-multi-choice-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-multi-choice-stack",children:n.map(v=>h.jsx(Xn,{className:"dsn-checkbox--full-width",label:v.label,checked:v.checked,disabled:l||v.disabled,showTrailingIcon:!1,showDescription:!!v.description,description:v.description,showDescriptionRight:!!v.descriptionRight,descriptionRight:v.descriptionRight,onCheckedChange:x=>c==null?void 0:c(v.id,x),...v.checkboxProps},v.id))})]}),m&&h.jsxs("div",{className:"dsn-multi-choice-meta",children:[i&&h.jsx("span",{className:"dsn-multi-choice-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-multi-choice-meta-icon",children:i})}),h.jsx("p",{id:p,className:"dsn-multi-choice-helper",children:m})]})]})}const oj=Array.from({length:6},(e,t)=>({id:`option-${t+1}`,label:"Label"}));function lj({id:e,label:t="Label",options:n=oj,value:r,defaultValue:i,helperText:a="Help text",helperIcon:s,error:o=!1,errorMessage:l,required:u=!1,disabled:c=!1,className:d,onValueChange:f,"aria-label":g}){const p=_.useId(),m=e??`dsn-single-choice-${p}`,v=`${m}-legend`,x=`${m}-helper`,y=o&&l?l:a,b=r!==void 0,[k,w]=_.useState(i??""),S=b?r:k;function N(E){b||w(E),f==null||f(E)}return h.jsxs("div",{className:["dsn-single-choice",d].filter(Boolean).join(" "),"data-error":o||void 0,"data-disabled":c||void 0,children:[h.jsxs("fieldset",{className:"dsn-single-choice-fieldset","aria-label":g,"aria-describedby":y?x:void 0,"aria-invalid":o||void 0,"aria-required":u||void 0,children:[h.jsxs("legend",{id:v,className:"dsn-single-choice-label",children:[t,u&&h.jsxs("span",{className:"dsn-single-choice-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx("div",{className:"dsn-single-choice-stack",role:"radiogroup","aria-labelledby":v,children:n.map(E=>h.jsx(Qd,{className:"dsn-radio--full-width",label:E.label,checked:S===E.id,disabled:c||E.disabled,showTrailingIcon:!1,showDescription:!!E.description,description:E.description,showDescriptionRight:!!E.descriptionRight,descriptionRight:E.descriptionRight,onCheckedChange:T=>{T&&N(E.id)},...E.radioProps},E.id))})]}),y&&h.jsxs("div",{className:"dsn-single-choice-meta",children:[s&&h.jsx("span",{className:"dsn-single-choice-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-single-choice-meta-icon",children:s})}),h.jsx("p",{id:x,className:"dsn-single-choice-helper",children:y})]})]})}const uj=Array.from({length:8},(e,t)=>({id:`option-${t+1}`,label:"Label"}));function cj({id:e,label:t="Label",options:n=uj,value:r,defaultValue:i=[],helperText:a="Help text",helperIcon:s,error:o=!1,errorMessage:l,required:u=!1,disabled:c=!1,size:d="md",className:f,onValueChange:g,"aria-label":p}){const m=_.useId(),x=`${e??`dsn-chip-field-${m}`}-helper`,y=o&&l?l:a,b=r!==void 0,[k,w]=_.useState(i),S=b?r:k,N=new Set(S);function E(T){const C=N.has(T)?S.filter(O=>O!==T):[...S,T];b||w(C),g==null||g(C)}return h.jsxs("div",{className:["dsn-chip-field",f].filter(Boolean).join(" "),"data-error":o||void 0,"data-disabled":c||void 0,children:[h.jsxs("fieldset",{className:"dsn-chip-fieldset","aria-label":p,"aria-describedby":y?x:void 0,"aria-invalid":o||void 0,"aria-required":u||void 0,children:[h.jsxs("legend",{className:"dsn-chip-field-label",children:[t,u&&h.jsxs("span",{className:"dsn-chip-field-required","aria-hidden":"true",children:[" ","*"]})]}),h.jsx(Xl,{label:t,className:"dsn-chip-field-group",children:n.map(T=>h.jsx(Gs,{label:T.label,size:d,selected:N.has(T.id),disabled:c||T.disabled,onClick:()=>E(T.id),...T.chipProps},T.id))})]}),y&&h.jsxs("div",{className:"dsn-chip-field-meta",children:[s&&h.jsx("span",{className:"dsn-chip-field-meta-icon-wrap","aria-hidden":"true",children:h.jsx("span",{className:"dsn-chip-field-meta-icon",children:s})}),h.jsx("p",{id:x,className:"dsn-chip-field-helper",children:y})]})]})}function Js(e,t,n){return Math.min(n,Math.max(t,e))}function Ia(e,t,n,r){if(r<=0)return Js(e,t,n);const i=t+Math.round((e-t)/r)*r,a=Js(i,t,n);return Number(a.toFixed(6))}function sf(e,t,n,r){const i=Ia(e[0],t,n,r),a=Ia(e[1],t,n,r);return[Math.min(i,a),Math.max(i,a)]}function of(e){const r=72+e.length*9;return Js(r,104,184)}function dj({id:e,mode:t="single",stack:n="vertical",showInput:r=!1,value:i,defaultValue:a,rangeValue:s,defaultRangeValue:o,min:l=0,max:u=100,step:c=1,disabled:d=!1,showValue:f=!0,showMinMax:g=!1,minLabel:p,maxLabel:m,minInputLabel:v="Minimum",maxInputLabel:x="Maximum",className:y,onValueChange:b,onRangeChange:k,valueFormatter:w=O=>String(O),minHandleAriaLabel:S="Minimum value",maxHandleAriaLabel:N="Maximum value","aria-label":E,"aria-labelledby":T,"aria-valuetext":C}){const O=_.useId(),$=e??`dsn-slider-${O}`,M=Math.min(l,u),j=Math.max(l,u),P=c>0?c:1,F=t==="single",B=n==="vertical",W=i!==void 0,q=s!==void 0,[D,A]=_.useState(()=>Ia(a??M,M,j,P)),[U,Y]=_.useState(()=>sf(o??[M,j],M,j,P)),[G,J]=_.useState(!1),[R,K]=_.useState("single"),Z=_.useRef(null),z=_.useRef(null),X=W?Ia(i,M,j,P):D,H=q?sf(s,M,j,P):U,I=_.useMemo(()=>j<=M?0:(X-M)/(j-M)*100,[X,M,j]),ne=_.useMemo(()=>{if(j<=M)return{minPct:0,maxPct:0};const me=(H[0]-M)/(j-M)*100,Ie=(H[1]-M)/(j-M)*100;return{minPct:me,maxPct:Ie}},[H,M,j]);function ue(me){const Ie=Ia(me,M,j,P);W||A(Ie),b==null||b(Ie)}function ye(me){const Ie=sf(me,M,j,P);q||Y(Ie),k==null||k(Ie)}function fe(me,Ie){const Ct=Ia(Ie,M,j,P);if(me==="min"){ye([Math.min(Ct,H[1]),H[1]]);return}ye([H[0],Math.max(Ct,H[0])])}function xe(me,Ie,Ct){const bt=Ie.getBoundingClientRect(),re=bt.width||1,ve=(me-bt.left)/re,ge=Js(ve,0,1),Ne=M+ge*(j-M);if(F){ue(Ne);return}fe(Ct??(R==="max"?"max":"min"),Ne)}function Se(me){if(d)return;const Ie=me.currentTarget;if(F)K("single");else{const Ct=Ie.getBoundingClientRect(),bt=Ct.width||1,re=Js((me.clientX-Ct.left)/bt,0,1),ve=M+re*(j-M),ge=Math.abs(ve-H[0]),Ne=Math.abs(ve-H[1]),pt=ge<=Ne?"min":"max";K(pt),Ie.setPointerCapture(me.pointerId),J(!0),xe(me.clientX,Ie,pt);return}Ie.setPointerCapture(me.pointerId),J(!0),xe(me.clientX,Ie)}function We(me){d||!G||xe(me.clientX,me.currentTarget)}function Ze(me){me.currentTarget.hasPointerCapture(me.pointerId)&&(me.currentTarget.releasePointerCapture(me.pointerId),J(!1))}function Nt(me){if(d)return;const Ie=P*10,bt=me.currentTarget.getAttribute("data-handle")??"single",re=bt==="min"?H[0]:bt==="max"?H[1]:X;function ve(ge){bt==="min"||bt==="max"?fe(bt,ge):ue(ge)}switch(me.key){case"ArrowRight":case"ArrowUp":me.preventDefault(),ve(re+P);break;case"ArrowLeft":case"ArrowDown":me.preventDefault(),ve(re-P);break;case"PageUp":me.preventDefault(),ve(re+Ie);break;case"PageDown":me.preventDefault(),ve(re-Ie);break;case"Home":me.preventDefault(),ve(M);break;case"End":me.preventDefault(),ve(j);break}}const Ve=p??w(M),Qe=m??w(j),mt=C??w(X),ht=`${w(H[0])} - ${w(H[1])}`,vt=ne.minPct,Le=ne.maxPct-ne.minPct,Et=f&&(F||!r),Tt=of(w(X)),at=of(w(H[0])),fr=of(w(H[1]));function Mn(){var Ie;const me=(Ie=z.current)==null?void 0:Ie.querySelector("input");me instanceof HTMLInputElement&&(me.focus(),me.select())}function Ut(me){me.key==="Enter"&&(me.preventDefault(),Mn())}return h.jsxs("div",{className:["dsn-slider",y].filter(Boolean).join(" "),id:$,"data-disabled":d||void 0,"data-stack":n,children:[Et&&h.jsx("div",{className:"dsn-slider-value",children:F?w(X):ht}),r&&F&&B&&h.jsx(Wi,{value:X,min:M,max:j,step:P,disabled:d,onChange:me=>{me!==null&&ue(me)},"aria-label":E??"Slider value"}),r&&!F&&B&&h.jsxs("div",{className:"dsn-slider-input-row",children:[h.jsx("div",{ref:Z,onKeyDown:Ut,children:h.jsx(Wi,{label:v,value:H[0],min:M,max:H[1],step:P,disabled:d,onChange:me=>{me!==null&&fe("min",me)},"aria-label":S})}),h.jsx("div",{ref:z,children:h.jsx(Wi,{label:x,value:H[1],min:H[0],max:j,step:P,disabled:d,onChange:me=>{me!==null&&fe("max",me)},"aria-label":N})})]}),h.jsxs("div",{className:"dsn-slider-main-row",children:[r&&!F&&!B&&h.jsx("div",{ref:Z,onKeyDown:Ut,style:{width:`${at}px`},children:h.jsx(Wi,{className:"dsn-slider-inline-input",value:H[0],min:M,max:H[1],step:P,disabled:d,onChange:me=>{me!==null&&fe("min",me)},"aria-label":S})}),h.jsxs("div",{className:"dsn-slider-track",onPointerDown:Se,onPointerMove:We,onPointerUp:Ze,onPointerCancel:Ze,onLostPointerCapture:()=>J(!1),children:[h.jsx("div",{className:"dsn-slider-bar"}),h.jsx("div",{className:"dsn-slider-range",style:F?{width:`${I}%`}:{left:`${vt}%`,width:`${Le}%`}}),h.jsx("div",{className:"dsn-slider-handle-wrap",style:{left:`${F?I:vt}%`},children:h.jsx("div",{role:"slider",tabIndex:d?-1:0,className:"dsn-slider-handle","data-handle":F?"single":"min","data-dragging":G&&R===(F?"single":"min")?!0:void 0,"aria-disabled":d||void 0,"aria-valuemin":M,"aria-valuemax":F?j:H[1],"aria-valuenow":F?X:H[0],"aria-valuetext":F?mt:w(H[0]),"aria-label":F?E??"Slider value":S,"aria-labelledby":F?T:void 0,onKeyDown:Nt})}),!F&&h.jsx("div",{className:"dsn-slider-handle-wrap",style:{left:`${ne.maxPct}%`},children:h.jsx("div",{role:"slider",tabIndex:d?-1:0,className:"dsn-slider-handle","data-handle":"max","data-dragging":G&&R==="max"?!0:void 0,"aria-disabled":d||void 0,"aria-valuemin":H[0],"aria-valuemax":j,"aria-valuenow":H[1],"aria-valuetext":w(H[1]),"aria-label":N,onKeyDown:Nt})})]}),r&&F&&!B&&h.jsx("div",{style:{width:`${Tt}px`},children:h.jsx(Wi,{className:"dsn-slider-inline-input",value:X,min:M,max:j,step:P,disabled:d,onChange:me=>{me!==null&&ue(me)},"aria-label":E??"Slider value"})}),r&&!F&&!B&&h.jsx("div",{ref:z,style:{width:`${fr}px`},children:h.jsx(Wi,{className:"dsn-slider-inline-input",value:H[1],min:H[0],max:j,step:P,disabled:d,onChange:me=>{me!==null&&fe("max",me)},"aria-label":N})})]}),g&&h.jsxs("div",{className:"dsn-slider-minmax","aria-hidden":"true",children:[h.jsx("span",{children:Ve}),h.jsx("span",{children:Qe})]})]})}const fj=3e3,hj=200;function pj(e){switch(e){case"success":return h.jsx(Ay,{size:16,"aria-hidden":"true"});case"warning":return h.jsx(zy,{size:16,"aria-hidden":"true"});case"error":return h.jsx(Vd,{size:16,"aria-hidden":"true"});case"default":default:return h.jsx(Kd,{size:16,"aria-hidden":"true"})}}function gj({variant:e="inline",severity:t="default",title:n,description:r,actionLabel:i,onAction:a,dismissible:s=!0,dismissLabel:o="Dismiss notification",onDismiss:l,icon:u,className:c}){const[d,f]=_.useState(!0),[g,p]=_.useState(!1),m=_.useRef(null),v=_.useRef(null),x=_.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null)},[]),y=_.useCallback(()=>{x(),!g&&(m.current=setTimeout(()=>{p(!0)},fj))},[x,g]);_.useEffect(()=>(y(),()=>{x()}),[x,y]),_.useEffect(()=>{if(g)return x(),v.current=setTimeout(()=>{f(!1),l==null||l()},hj),()=>{v.current&&(clearTimeout(v.current),v.current=null)}},[x,g,l]);const b=t==="error"?"assertive":"polite",k=t==="error"?"alert":"status",w=e==="rich"&&!!r;return d?h.jsxs("div",{className:["dsn-toast",c].filter(Boolean).join(" "),"data-severity":t,"data-variant":e,"data-state":g?"exit":"enter",role:k,"aria-live":b,"aria-atomic":"true",onMouseEnter:x,onMouseLeave:y,children:[h.jsx("span",{className:"dsn-toast-icon","aria-hidden":"true",children:u??pj(t)}),h.jsxs("div",{className:"dsn-toast-content",children:[h.jsx("div",{className:"dsn-toast-title",children:n}),w?h.jsx("div",{className:"dsn-toast-description",children:r}):null]}),i?h.jsx(we,{className:"dsn-toast-action",variant:"secondary",size:"sm",onClick:a,children:i}):null,s?h.jsx(we,{className:"dsn-toast-dismiss",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Dr,{size:16,"aria-hidden":"true"}),"aria-label":o,onClick:()=>p(!0)}):null]}):null}function mj(e){switch(e){case"success":return h.jsx(Ay,{size:16,"aria-hidden":"true"});case"warning":return h.jsx(zy,{size:16,"aria-hidden":"true"});case"error":return h.jsx(Vd,{size:16,"aria-hidden":"true"});case"default":default:return h.jsx(Kd,{size:16,"aria-hidden":"true"})}}function vj({severity:e="default",title:t,description:n,icon:r,content:i,actions:a,supporting:s,dismissible:o=!0,dismissLabel:l="Dismiss callout",onDismiss:u,className:c}){const d=!!i,f=!!a||!!s,g=e==="error"?"alert":"status",p=e==="error"?"assertive":"polite";return h.jsxs("section",{className:["dsn-callout",c].filter(Boolean).join(" "),"data-severity":e,role:g,"aria-live":p,"aria-atomic":"true",children:[h.jsxs("div",{className:"dsn-callout-header",children:[h.jsx("span",{className:"dsn-callout-icon","aria-hidden":"true",children:r??mj(e)}),h.jsxs("div",{className:"dsn-callout-text",children:[h.jsx("p",{className:"dsn-callout-title",children:t}),n?h.jsx("p",{className:"dsn-callout-description",children:n}):null]}),o?h.jsx(we,{className:"dsn-callout-dismiss",variant:"ghost",size:"sm",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Dr,{size:16,"aria-hidden":"true"}),"aria-label":l,onClick:u}):null]}),d?h.jsx("div",{className:"dsn-callout-content",children:i}):null,f?h.jsxs("div",{className:"dsn-callout-footer",children:[h.jsx("div",{className:"dsn-callout-supporting",children:s}),h.jsx("div",{className:"dsn-callout-actions",children:a})]}):null]})}function yj({title:e,description:t,disclosure:n="left",bordered:r=!1,expanded:i,defaultExpanded:a=!1,disabled:s=!1,children:o,className:l,contentClassName:u,onExpandedChange:c}){const d=_.useId(),f=`dsn-accordion-trigger-${d}`,g=`dsn-accordion-content-${d}`,p=i!==void 0,[m,v]=_.useState(a),x=p?i:m,y=["dsn-accordion",l].filter(Boolean).join(" "),b=["dsn-accordion-content-inner",u].filter(Boolean).join(" "),k=h.jsx(zi,{size:16,"aria-hidden":"true"});function w(N){p||v(N),c==null||c(N)}function S(){return h.jsx("span",{className:"dsn-accordion-disclosure-icon",children:k})}return h.jsxs("div",{className:y,"data-bordered":r||void 0,"data-expanded":x||void 0,"data-disclosure":n,"data-disabled":s||void 0,children:[h.jsx("button",{id:f,type:"button",className:"dsn-accordion-trigger","aria-expanded":x,"aria-controls":g,disabled:s,onClick:()=>w(!x),children:h.jsx(Rr,{title:e,description:t,size:"medium",leadingControl:n==="left"?S():void 0,trailingControl:n==="right"?S():void 0,className:"dsn-accordion-section-header"})}),x&&h.jsx("div",{id:g,role:"region","aria-labelledby":f,className:"dsn-accordion-content",children:h.jsx("div",{className:b,children:o})})]})}function t0({page:e,selected:t=!1,disabled:n=!1,onClick:r,className:i}){return h.jsx("button",{type:"button",className:`dsn-page-selector${i?` ${i}`:""}`,"data-selected":t||void 0,disabled:n,"aria-current":t?"page":void 0,onClick:n?void 0:r,children:h.jsx("span",{className:"dsn-page-selector-number",children:e})})}function xj(e,t){if(t<=0)return[];const n=new Set([1,t]);for(let s=Math.max(1,e-1);s<=Math.min(t,e+1);s++)n.add(s);const r=Array.from(n).sort((s,o)=>s-o),i=[];let a=0;for(let s=0;s<r.length;s++){if(s>0){const o=r[s]-r[s-1];o===2?i.push(r[s-1]+1):o>2&&(i.push(a===0?"ellipsis-start":"ellipsis-end"),a++)}i.push(r[s])}return i}function bj({page:e,totalPages:t,onPageChange:n,totalRecords:r,pageSize:i,rowsPerPage:a,rowsPerPageOptions:s=[10,25,50,100],onRowsPerPageChange:o,className:l}){const u=xj(e,t),[c,d]=_.useState(!1),f=_.useRef(null);_.useEffect(()=>{if(!c)return;const p=m=>{f.current&&!f.current.contains(m.target)&&d(!1)};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[c]);let g=null;if(r!==void 0&&i!==void 0){const p=(e-1)*i+1,m=Math.min(e*i,r);g=`${p}–${m} of ${r}`}return h.jsxs("nav",{className:`dsn-pagination${l?` ${l}`:""}`,"aria-label":"Pagination",children:[a!==void 0&&h.jsx("div",{className:"dsn-pagination-meta",children:h.jsxs("div",{className:"dsn-pagination-rows",children:[h.jsxs("div",{ref:f,className:"dsn-pagination-rows-trigger",children:[h.jsx(we,{variant:"ghost",size:"sm",showTrailingIcon:!0,trailingIcon:h.jsx(zi,{size:16,strokeWidth:1.5}),"aria-label":"Rows per page","aria-haspopup":"menu","aria-expanded":c,onClick:()=>d(p=>!p),children:a}),c&&h.jsx(Fr,{role:"menu","aria-label":"Rows per page options",anchorRef:f,offset:4,viewportMargin:16,contentPadding:"small",content:h.jsx("div",{children:s.map(p=>h.jsx(Bi,{label:String(p),fullWidth:!0,showLeadingIcon:!1,showTrailingIcon:a===p,selected:a===p,"aria-label":String(p),onClick:()=>{o==null||o(p),d(!1)}},p))})})]}),h.jsx("span",{className:"dsn-pagination-rows-label",children:"Rows per page"})]})}),h.jsxs("div",{className:"dsn-pagination-controls",children:[g&&h.jsx("span",{className:"dsn-pagination-summary","aria-live":"polite","aria-atomic":"true",children:g}),h.jsx(we,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(pC,{size:16,strokeWidth:1.5}),showLabel:!1,disabled:e<=1,"aria-label":"Go to previous page","aria-disabled":e<=1,onClick:()=>n(e-1)}),h.jsx("div",{className:"dsn-pagination-pages",role:"group","aria-label":"Pages",children:u.map(p=>p==="ellipsis-start"||p==="ellipsis-end"?h.jsx(we,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(yC,{size:16,strokeWidth:1.5}),showLabel:!1,"aria-label":"More pages",className:"dsn-pagination-ellipsis"},p):h.jsx(t0,{page:p,selected:p===e,onClick:()=>n(p)},p))}),h.jsx(we,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(Aa,{size:16,strokeWidth:1.5}),showLabel:!1,disabled:e>=t,"aria-label":"Go to next page","aria-disabled":e>=t,onClick:()=>n(e+1)})]})]})}function _j(e,t,n){return!n||t<3?!1:e>t}function wj({items:e,maxVisibleItems:t=4,showEllipsis:n=!0,ellipsisLabel:r="...",ellipsisAriaLabel:i="Show more breadcrumbs",separator:a,className:s,"aria-label":o="Breadcrumb",onItemClick:l}){const[u,c]=_.useState(!1),d="sm",f=a??h.jsx(Aa,{size:16,"aria-hidden":"true"}),g=["dsn-breadcrumbs",s].filter(Boolean).join(" "),p=_.useMemo(()=>{const v=e.map((w,S)=>({type:"item",item:w,index:S}));if(!_j(e.length,t,n)||u)return v;const y=v[0],b=Math.max(1,t-2),k=v.slice(-b);return[y,{type:"ellipsis"},...k]},[u,e,t,n]);function m(v,x,y){var b;(b=x.onClick)==null||b.call(x,v,x,y),l==null||l(v,x,y)}return h.jsx("nav",{className:g,"aria-label":o,children:h.jsx("ol",{className:"dsn-breadcrumbs-list",children:p.map((v,x)=>{const y=x===p.length-1;if(v.type==="ellipsis")return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[h.jsx(we,{variant:"plain",size:d,"aria-label":i,onClick:()=>c(!0),children:r}),y?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:f})]},`ellipsis-${x}`);const{item:b,index:k}=v,w=k===e.length-1;return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[w?h.jsx("span",{className:"dsn-breadcrumbs-current","aria-current":"page",children:b.label}):b.href&&!b.disabled?h.jsx("a",{className:"dsn-breadcrumbs-link",href:b.href,"aria-label":b.ariaLabel,onClick:S=>m(S,b,k),children:b.label}):h.jsx(we,{variant:"plain",size:d,disabled:b.disabled,"aria-label":b.ariaLabel,onClick:S=>m(S,b,k),children:b.label}),y?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:f})]},b.id??`${k}-${String(b.label)}`)})})})}function kj(e,t,n){return!n||t<3?!1:e>t}function Sj(e,t,n){return e.variant?e.variant:t===n-1?"current":"previous"}function n0({items:e,maxVisibleItems:t=4,showEllipsis:n=!0,ellipsisLabel:r="...",ellipsisAriaLabel:i="Show more breadcrumbs",className:a,"aria-label":s="Breadcrumb",onItemClick:o}){const[l,u]=_.useState(!1),c=["dsn-breadcrumbs dsn-breadcrumbs-controller",a].filter(Boolean).join(" "),d=_.useMemo(()=>{const g=e.map((y,b)=>({type:"item",item:y,index:b}));if(!kj(e.length,t,n)||l)return g;const m=g[0],v=Math.max(1,t-2),x=g.slice(-v);return[m,{type:"ellipsis"},...x]},[l,e,t,n]);function f(g,p,m){var v;(v=p.onClick)==null||v.call(p,g,p,m),o==null||o(g,p,m)}return h.jsx("nav",{className:c,"aria-label":s,children:h.jsx("ol",{className:"dsn-breadcrumbs-list",children:d.map((g,p)=>{const m=p===d.length-1;if(g.type==="ellipsis")return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[h.jsx("button",{type:"button",className:"dsn-breadcrumbs-controller-trigger dsn-breadcrumbs-controller-trigger-ellipsis","aria-label":i,onClick:()=>u(!0),children:h.jsx("span",{className:"dsn-breadcrumbs-controller-label",children:r})}),m?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:h.jsx(Aa,{size:16})})]},`ellipsis-${p}`);const{item:v,index:x}=g,y=Sj(v,x,e.length),b=y==="ellipsis"?r:v.label,k=y==="current",w=v.showDisclosure??y!=="ellipsis";return h.jsxs("li",{className:"dsn-breadcrumbs-item",children:[k?h.jsxs("span",{className:"dsn-breadcrumbs-controller-current","aria-current":"page",children:[h.jsx("span",{className:"dsn-breadcrumbs-controller-label",children:b}),w?h.jsx("span",{className:"dsn-breadcrumbs-controller-disclosure","aria-hidden":"true",children:h.jsx(zi,{size:16})}):null]}):h.jsxs("button",{type:"button",className:"dsn-breadcrumbs-controller-trigger",disabled:v.disabled,"aria-label":v.ariaLabel,onClick:S=>f(S,v,x),children:[h.jsx("span",{className:"dsn-breadcrumbs-controller-label",children:b}),w?h.jsx("span",{className:"dsn-breadcrumbs-controller-disclosure","aria-hidden":"true",children:h.jsx(zi,{size:16})}):null]}),m?null:h.jsx("span",{className:"dsn-breadcrumbs-separator","aria-hidden":"true",children:h.jsx(Aa,{size:16})})]},v.id??`${x}-${String(b)}`)})})})}function lf({variant:e="full",label:t="Label",showIcon:n=!0,icon:r,showAvatar:i=!1,avatarProps:a,showBadge:s=!1,badgeCount:o=3,badgeVariant:l="highlight-strong",showDisclosure:u=!1,showRightButton:c=!1,rightButton:d,selected:f=!1,disabled:g=!1,onClick:p,className:m,"aria-label":v}){const x=e==="icon",y=["dsn-sidebar-selector",m].filter(Boolean).join(" "),b=v??(x?t:void 0);return h.jsxs("div",{className:y,"data-variant":e,"data-selected":f||void 0,"data-disabled":g||void 0,children:[h.jsxs("button",{type:"button",className:"dsn-sidebar-selector-container",disabled:g,"aria-label":b,onClick:p,children:[n&&!i&&h.jsx("span",{className:"dsn-sidebar-selector-icon-wrap","aria-hidden":"true",children:r??h.jsx(gr,{})}),i&&h.jsx("span",{className:"dsn-sidebar-selector-avatar-wrap",children:h.jsx(Ri,{size:"xs",variant:"organization",fill:"initials",initials:"AA",name:"Avatar",...a})}),!x&&h.jsx("span",{className:"dsn-sidebar-selector-label-wrap",children:h.jsx("span",{className:"dsn-sidebar-selector-label",children:t})}),!x&&s&&h.jsx("span",{className:"dsn-sidebar-selector-badge-wrap",children:h.jsx(Ys,{size:"sm",variant:l,count:o})}),!x&&u&&h.jsx("span",{className:"dsn-sidebar-selector-disclosure","aria-hidden":"true",children:h.jsx(gC,{size:16})}),!x&&c&&d&&h.jsx("span",{className:"dsn-sidebar-selector-action-wrap",onClick:k=>k.stopPropagation(),onKeyDown:k=>k.stopPropagation(),children:d})]}),f&&h.jsx("span",{className:"dsn-sidebar-selector-rail","aria-hidden":"true"})]})}function Nj({size:e="default",className:t,hasPicture:n=!0,picture:r,hasTitle:i=!0,title:a="Title",hasSubtitle:s=!0,subtitle:o="Subtitle.",hasActions:l=!0,showMainCta:u=!0,mainCtaLabel:c="Button",onMainCtaClick:d,showSecondaryOption:f=!0,secondaryOptionLabel:g="Button",onSecondaryOptionClick:p,showTertiaryOption:m=!0,tertiaryOptionLabel:v="Button",onTertiaryOptionClick:x,showLink:y=!0,linkLabel:b="Button",onLinkClick:k,showHelpText:w=!0,helpText:S="Help text"}){const N=["dsn-empty-state",t].filter(Boolean).join(" "),E=e==="small"?"sm":"md",T=u||f||m||y||w;return h.jsx("div",{className:N,"data-size":e,children:h.jsxs("div",{className:"dsn-empty-state-content",children:[n?h.jsx("div",{className:"dsn-empty-state-picture","aria-hidden":"true",children:r}):null,(i||s)&&h.jsxs("div",{className:"dsn-empty-state-copy",children:[i?h.jsx("p",{className:"dsn-empty-state-title",children:a}):null,s?h.jsx("p",{className:"dsn-empty-state-subtitle",children:o}):null]}),l&&T?h.jsxs("div",{className:"dsn-empty-state-actions",children:[u?h.jsx(we,{variant:"primary",size:E,onClick:d,children:c}):null,f?h.jsx(we,{variant:"secondary",size:E,onClick:p,children:g}):null,m?h.jsx(we,{variant:"ghost",size:E,onClick:x,children:v}):null,y?h.jsx(we,{variant:"plain",size:"sm",onClick:k,children:b}):null,w?h.jsx("p",{className:"dsn-empty-state-help-text",children:S}):null]}):null]})})}function ae(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function r0(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);n.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Jn=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,Ej=Jn&&"documentMode"in document?document.documentMode:null,Zn=Jn&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),ui=Jn&&/^(?!.*Seamonkey)(?=.*Firefox).*/i.test(navigator.userAgent),Ql=!(!Jn||!("InputEvent"in window)||Ej)&&"getTargetRanges"in new window.InputEvent("input"),eu=Jn&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),Zs=Jn&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,Tj=Jn&&/Android/.test(navigator.userAgent),i0=Jn&&/^(?=.*Chrome).*/i.test(navigator.userAgent),uf=Jn&&Tj&&i0,tu=Jn&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Zn&&!i0,Cj=0,Mj=1,jj=2,a0=128,Oj=1,$j=2,Pj=3,Aj=4,Lj=5,Dj=6,Qs=eu||Zs||tu?" ":"​",nu=`
271
+
272
+ `,cf=ui?" ":Qs,Hi={bold:1,capitalize:1024,code:16,highlight:a0,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512},Ij={directionless:1,unmergeable:2},df={center:2,end:6,justify:4,left:1,right:3,start:5},Fj={[$j]:"center",[Dj]:"end",[Aj]:"justify",[Oj]:"left",[Pj]:"right",[Lj]:"start"},zj={normal:0,segmented:2,token:1},Rj={[Cj]:"normal",[jj]:"segmented",[Mj]:"token"},s0="$config";function o0(e,t,n,r,i,a){let s=e.getFirstChild();for(;s!==null;){const o=s.__key;s.__parent===t&&(Q(s)&&o0(s,o,n,r,i,a),n.has(o)||a.delete(o),i.push(o)),s=s.getNextSibling()}}let ff=!1,hf=0;function Bj(e){hf=e.timeStamp}function pf(e,t,n){const r=e.nodeName==="BR",i=t.__lexicalLineBreak;return i&&(e===i||r&&e.previousSibling===i)||r&&Ou(e,n)!==void 0}function Wj(e,t,n){const r=On(kn(n));let i=null,a=null;r!==null&&r.anchorNode===e&&(i=r.anchorOffset,a=r.focusOffset);const s=e.nodeValue;s!==null&&eh(t,s,i,a,!1)}function Uj(e,t,n){if(ie(e)){const r=e.anchor.getNode();if(r.is(n)&&e.format!==r.getFormat())return!1}return Kr(t)&&n.isAttached()}function Hj(e,t,n,r){for(let i=e;i&&!GO(i);i=mo(i)){const a=Ou(i,t);if(a!==void 0){const s=kt(a,n);if(s)return Re(s)||!yt(i)?void 0:[i,s]}else if(i===r)return[r,Jx(n)]}}function l0(e,t,n){ff=!0;const r=performance.now()-hf>100;try{yr(e,()=>{const i=de()||function(f){return f.getEditorState().read(()=>{const g=de();return g!==null?g.clone():null})}(e),a=new Map,s=e.getRootElement(),o=e._editorState,l=e._blockCursorElement;let u=!1,c="";for(let f=0;f<t.length;f++){const g=t[f],p=g.type,m=g.target,v=Hj(m,e,o,s);if(!v)continue;const[x,y]=v;if(p==="characterData")r&&ce(y)&&Kr(m)&&Uj(i,m,y)&&Wj(m,y,e);else if(p==="childList"){u=!0;const b=g.addedNodes;for(let S=0;S<b.length;S++){const N=b[S],E=Yx(N),T=N.parentNode;if(T!=null&&N!==l&&E===null&&!pf(N,T,e)){if(ui){const C=(yt(N)?N.innerText:null)||N.nodeValue;C&&(c+=C)}T.removeChild(N)}}const k=g.removedNodes,w=k.length;if(w>0){let S=0;for(let N=0;N<w;N++){const E=k[N];(pf(E,m,e)||l===E)&&(m.appendChild(E),S++)}w!==S&&a.set(x,y)}}}if(a.size>0)for(const[f,g]of a)g.reconcileObservedMutation(f,e);const d=n.takeRecords();if(d.length>0){for(let f=0;f<d.length;f++){const g=d[f],p=g.addedNodes,m=g.target;for(let v=0;v<p.length;v++){const x=p[v],y=x.parentNode;y==null||x.nodeName!=="BR"||pf(x,m,e)||y.removeChild(x)}}n.takeRecords()}i!==null&&(u&&Yt(i),ui&&sb(e)&&i.insertRawText(c))})}finally{ff=!1}}function u0(e){const t=e._observer;t!==null&&l0(e,t.takeRecords(),t)}function c0(e){(function(t){hf===0&&kn(t).addEventListener("textInput",Bj,!0)})(e),e._observer=new MutationObserver((t,n)=>{l0(e,t,n)})}let qj=class{constructor(t,n){ee(this,"key");ee(this,"parse");ee(this,"unparse");ee(this,"isEqual");ee(this,"defaultValue");this.key=t,this.parse=n.parse.bind(n),this.unparse=(n.unparse||Xj).bind(n),this.isEqual=(n.isEqual||Object.is).bind(n),this.defaultValue=this.parse(void 0)}};function Vj(e,t){return new qj(e,t)}function Kj(e){const t=new Map,n=new Set;for(let r=typeof e=="function"?e:e.replace;r.prototype&&r.prototype.getType!==void 0;r=Object.getPrototypeOf(r)){const{ownNodeConfig:i}=Lu(r);if(i&&i.stateConfigs)for(const a of i.stateConfigs){let s;"stateConfig"in a?(s=a.stateConfig,a.flat&&n.add(s.key)):s=a,t.set(s.key,s)}}return{flatKeys:n,sharedConfigMap:t}}let Yj=class ZT{constructor(t,n,r=void 0,i=new Map,a=void 0){ee(this,"node");ee(this,"knownState");ee(this,"unknownState");ee(this,"sharedNodeState");ee(this,"size");this.node=t,this.sharedNodeState=n,this.unknownState=r,this.knownState=i;const{sharedConfigMap:s}=this.sharedNodeState,o=a!==void 0?a:function(l,u,c){let d=c.size;if(u)for(const f in u){const g=l.get(f);g&&c.has(g)||d++}return d}(s,r,i);this.size=o}getValue(t){const n=this.knownState.get(t);if(n!==void 0)return n;this.sharedNodeState.sharedConfigMap.set(t.key,t);let r=t.defaultValue;if(this.unknownState&&t.key in this.unknownState){const i=this.unknownState[t.key];i!==void 0&&(r=t.parse(i)),this.updateFromKnown(t,r)}return r}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){const t={...this.unknownState},n={};for(const[r,i]of this.knownState)r.isEqual(i,r.defaultValue)?delete t[r.key]:t[r.key]=r.unparse(i);for(const r of this.sharedNodeState.flatKeys)r in t&&(n[r]=t[r],delete t[r]);return f0(t)&&(n.$=t),n}getWritable(t){if(this.node===t)return this;const{sharedNodeState:n,unknownState:r}=this,i=new Map(this.knownState);return new ZT(t,n,function(a,s,o){let l;if(o)for(const[u,c]of Object.entries(o)){const d=a.get(u);d?s.has(d)||s.set(d,d.parse(c)):(l=l||{},l[u]=c)}return l}(n.sharedConfigMap,i,r),i,this.size)}updateFromKnown(t,n){const r=t.key;this.sharedNodeState.sharedConfigMap.set(r,t);const{knownState:i,unknownState:a}=this;i.has(t)||a&&r in a||(a&&(delete a[r],this.unknownState=f0(a)),this.size++),i.set(t,n)}updateFromUnknown(t,n){const r=this.sharedNodeState.sharedConfigMap.get(t);r?this.updateFromKnown(r,r.parse(n)):(this.unknownState=this.unknownState||{},t in this.unknownState||this.size++,this.unknownState[t]=n)}updateFromJSON(t){const{knownState:n}=this;for(const r of n.keys())n.set(r,r.defaultValue);if(this.size=n.size,this.unknownState=void 0,t)for(const[r,i]of Object.entries(t))this.updateFromUnknown(r,i)}};function Gj(e){const t=e.getWritable(),n=t.__state?t.__state.getWritable(t):new Yj(t,d0(t));return t.__state=n,n}function d0(e){return e.__state?e.__state.sharedNodeState:Wx(Au(),e.getType()).sharedNodeState}function f0(e){if(e)for(const t in e)return e}function Xj(e){return e}function h0(e,t,n){for(const[r,i]of t.knownState){if(e.has(r.key))continue;e.add(r.key);const a=n?n.getValue(r):r.defaultValue;if(a!==i&&!r.isEqual(a,i))return!0}return!1}function p0(e,t,n){const{unknownState:r}=t,i=n?n.unknownState:void 0;if(r){for(const[a,s]of Object.entries(r))if(!e.has(a)&&(e.add(a),s!==(i?i[a]:void 0)))return!0}return!1}function g0(e,t){const n=e.__state;return n&&n.node===e?n.getWritable(t):n}function m0(e,t){const n=e.__mode,r=e.__format,i=e.__style,a=t.__mode,s=t.__format,o=t.__style,l=e.__state,u=t.__state;return(n===null||n===a)&&(r===null||r===s)&&(i===null||i===o)&&(e.__state===null||l===u||function(c,d){if(c===d)return!0;if(c&&d&&c.size!==d.size)return!1;const f=new Set;return!(c&&h0(f,c,d)||d&&h0(f,d,c)||c&&p0(f,c,d)||d&&p0(f,d,c))}(l,u))}function v0(e,t){const n=e.mergeWithSibling(t),r=et()._normalizedNodes;return r.add(e.__key),r.add(t.__key),n}function y0(e){let t,n,r=e;if(r.__text!==""||!r.isSimpleText()||r.isUnmergeable()){for(;(t=r.getPreviousSibling())!==null&&ce(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(t.__text!==""){if(m0(t,r)){r=v0(t,r);break}break}t.remove()}for(;(n=r.getNextSibling())!==null&&ce(n)&&n.isSimpleText()&&!n.isUnmergeable();){if(n.__text!==""){if(m0(r,n)){r=v0(r,n);break}break}n.remove()}}else r.remove()}function qi(e){return x0(e.anchor),x0(e.focus),e}function x0(e){for(;e.type==="element";){const t=e.getNode(),n=e.offset;let r,i;if(n===t.getChildrenSize()?(r=t.getChildAtIndex(n-1),i=!0):(r=t.getChildAtIndex(n),i=!1),ce(r)){e.set(r.__key,i?r.getTextContentSize():0,"text",!0);break}if(!Q(r))break;e.set(r.__key,i?r.getChildrenSize():0,"element",!0)}}let Vi,It,eo,ru,gf,mf,Ki,Qn,vf,to,_t="",mr=null,Yi=null,Fa=!1,iu=!1;function au(e,t){const n=Ki.get(e);if(t!==null){const r=wf(e);r.parentNode===t&&t.removeChild(r)}if(Qn.has(e)||It._keyToDOMMap.delete(e),Q(n)){const r=ou(n,Ki);yf(r,0,r.length-1,null)}n!==void 0&&th(to,eo,ru,n,"destroyed")}function yf(e,t,n,r){for(let i=t;i<=n;++i){const a=e[i];a!==void 0&&au(a,r)}}function Gi(e,t){e.setProperty("text-align",t)}const Jj="40px";function b0(e,t){const n=Vi.theme.indent;if(typeof n=="string"){const i=e.classList.contains(n);t>0&&!i?e.classList.add(n):t<1&&i&&e.classList.remove(n)}if(t===0)return void e.style.setProperty("padding-inline-start","");const r=getComputedStyle(It._rootElement||e).getPropertyValue("--lexical-indent-base-value")||Jj;e.style.setProperty("padding-inline-start",`calc(${t} * ${r})`)}function _0(e,t){const n=e.style;t===0?Gi(n,""):t===1?Gi(n,"left"):t===2?Gi(n,"center"):t===3?Gi(n,"right"):t===4?Gi(n,"justify"):t===5?Gi(n,"start"):t===6&&Gi(n,"end")}function xf(e,t){const n=function(r){const i=r.__dir;if(i!==null)return i;if(wt(r))return null;const a=r.getParentOrThrow();return wt(a)&&a.__dir===null?"auto":null}(t);n!==null?e.dir=n:e.removeAttribute("dir")}function su(e,t){const n=Qn.get(e);n===void 0&&ae(60);const r=n.createDOM(Vi,It);if(function(i,a,s){const o=s._keyToDOMMap;(function(l,u,c){const d=`__lexicalKey_${u._key}`;l[d]=c})(a,s,i),o.set(i,a)}(e,r,It),ce(n)?r.setAttribute("data-lexical-text","true"):Re(n)&&r.setAttribute("data-lexical-decorator","true"),Q(n)){const i=n.__indent,a=n.__size;if(xf(r,n),i!==0&&b0(r,i),a!==0){const o=a-1;bf(ou(n,Qn),n,0,o,n.getDOMSlot(r))}const s=n.__format;s!==0&&_0(r,s),n.isInline()||k0(null,n,r)}else{const i=n.getTextContent();if(Re(n)){const a=n.decorate(It,Vi);a!==null&&S0(e,a),r.contentEditable="false"}_t+=i}return t!==null&&t.insertChild(r),th(to,eo,ru,n,"created"),r}function bf(e,t,n,r,i){const a=_t;_t="";let s=n;for(;s<=r;++s){su(e[s],i);const o=Qn.get(e[s]);o!==null&&ce(o)?mr===null&&(mr=o.getFormat(),Yi=o.getStyle()):Q(o)&&s<r&&!o.isInline()&&(_t+=nu)}i.element.__lexicalTextContent=_t,_t=a+_t}function w0(e,t){if(e){const n=e.__last;if(n){const r=t.get(n);if(r)return qa(r)?"line-break":Re(r)&&r.isInline()?"decorator":null}return"empty"}return null}function k0(e,t,n){const r=w0(e,Ki),i=w0(t,Qn);r!==i&&t.getDOMSlot(n).setManagedLineBreak(i)}function Zj(e,t,n){var r;mr=null,Yi=null,function(i,a,s){const o=_t,l=i.__size,u=a.__size;_t="";const c=s.element;if(l===1&&u===1){const d=i.__first,f=a.__first;if(d===f)lu(d,c);else{const p=wf(d),m=su(f,null);try{c.replaceChild(m,p)}catch(v){if(typeof v=="object"&&v!=null){const x=`${v.toString()} Parent: ${c.tagName}, new child: {tag: ${m.tagName} key: ${f}}, old child: {tag: ${p.tagName}, key: ${d}}.`;throw new Error(x)}throw v}au(d,null)}const g=Qn.get(f);ce(g)&&mr===null&&(mr=g.getFormat(),Yi=g.getStyle())}else{const d=ou(i,Ki),f=ou(a,Qn);if(d.length!==l&&ae(227),f.length!==u&&ae(228),l===0)u!==0&&bf(f,0,0,u-1,s);else if(u===0){if(l!==0){const g=s.after==null&&s.before==null&&s.element.__lexicalLineBreak==null;yf(d,0,l-1,g?null:c),g&&(c.textContent="")}}else(function(g,p,m,v,x,y){const b=v-1,k=x-1;let w,S,N=y.getFirstChild(),E=0,T=0;for(;E<=b&&T<=k;){const $=p[E],M=m[T];if($===M)N=_f(lu(M,y.element)),E++,T++;else{if(S===void 0&&(S=N0(m,T)),w===void 0)w=N0(p,E);else if(!w.has($)){E++;continue}if(!S.has($)){N=_f(wf($)),au($,y.element),E++,w.delete($);continue}if(w.has(M)){const P=ts(It,M);P!==N&&y.withBefore(N).insertChild(P),N=_f(lu(M,y.element)),E++,T++}else su(M,y.withBefore(N)),T++}const j=Qn.get(M);j!==null&&ce(j)?mr===null&&(mr=j.getFormat(),Yi=j.getStyle()):Q(j)&&T<=k&&!j.isInline()&&(_t+=nu)}const C=E>b,O=T>k;if(C&&!O){const $=m[k+1],M=$===void 0?null:It.getElementByKey($);bf(m,0,T,k,y.withBefore(M))}else O&&!C&&yf(p,E,b,y.element)})(0,d,f,l,u,s)}c.__lexicalTextContent=_t,_t=o+_t}(e,t,t.getDOMSlot(n)),r=t,mr==null||mr===r.__textFormat||iu||r.setTextFormat(mr),function(i){Yi==null||Yi===i.__textStyle||iu||i.setTextStyle(Yi)}(t)}function ou(e,t){const n=[];let r=e.__first;for(;r!==null;){const i=t.get(r);i===void 0&&ae(101),n.push(r),r=i.__next}return n}function lu(e,t){const n=Ki.get(e);let r=Qn.get(e);n!==void 0&&r!==void 0||ae(61);const i=Fa||mf.has(e)||gf.has(e),a=ts(It,e);if(n===r&&!i){let s;if(Q(n)){const o=a.__lexicalTextContent;typeof o=="string"?s=o:(s=n.getTextContent(),a.__lexicalTextContent=s)}else s=n.getTextContent();return _t+=s,a}if(n!==r&&i&&th(to,eo,ru,r,"updated"),r.updateDOM(n,a,Vi)){const s=su(e,null);return t===null&&ae(62),t.replaceChild(s,a),au(e,null),s}if(Q(n)){Q(r)||ae(334,e);const s=r.__indent;(Fa||s!==n.__indent)&&b0(a,s);const o=r.__format;if((Fa||o!==n.__format)&&_0(a,o),i)Zj(n,r,a),wt(r)||r.isInline()||k0(n,r,a);else{const l=a.__lexicalTextContent;let u;typeof l=="string"?u=l:(u=n.getTextContent(),a.__lexicalTextContent=u),_t+=u}if((Fa||r.__dir!==n.__dir)&&(xf(a,r),wt(r)&&!Fa))for(const l of r.getChildren())Q(l)&&xf(ts(It,l.getKey()),l)}else{const s=r.getTextContent();if(Re(r)){const o=r.decorate(It,Vi);o!==null&&S0(e,o)}_t+=s}if(!iu&&wt(r)&&r.__cachedText!==_t){const s=r.getWritable();s.__cachedText=_t,r=s}return a}function S0(e,t){let n=It._pendingDecorators;const r=It._decorators;if(n===null){if(r[e]===t)return;n=Gx(It)}n[e]=t}function _f(e){let t=e.nextSibling;return t!==null&&t===It._blockCursorElement&&(t=t.nextSibling),t}function N0(e,t){const n=new Set;for(let r=t;r<e.length;r++)n.add(e[r]);return n}function Qj(e,t,n,r,i,a){_t="",Fa=r===2,It=n,Vi=n._config,eo=n._nodes,ru=It._listeners.mutation,gf=i,mf=a,Ki=e._nodeMap,Qn=t._nodeMap,iu=t._readOnly,vf=new Map(n._keyToDOMMap);const s=new Map;return to=s,lu("root",null),It=void 0,eo=void 0,gf=void 0,mf=void 0,Ki=void 0,Qn=void 0,Vi=void 0,vf=void 0,to=void 0,s}function wf(e){const t=vf.get(e);return t===void 0&&ae(75,e),t}function be(e){return{type:e}}const kf=be("SELECTION_CHANGE_COMMAND"),eO=be("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),E0=be("CLICK_COMMAND"),T0=be("BEFORE_INPUT_COMMAND"),C0=be("INPUT_COMMAND"),M0=be("COMPOSITION_START_COMMAND"),j0=be("COMPOSITION_END_COMMAND"),Xi=be("DELETE_CHARACTER_COMMAND"),za=be("INSERT_LINE_BREAK_COMMAND"),no=be("INSERT_PARAGRAPH_COMMAND"),Ra=be("CONTROLLED_TEXT_INSERTION_COMMAND"),uu=be("PASTE_COMMAND"),Sf=be("REMOVE_TEXT_COMMAND"),ro=be("DELETE_WORD_COMMAND"),io=be("DELETE_LINE_COMMAND"),_n=be("FORMAT_TEXT_COMMAND"),cu=be("UNDO_COMMAND"),du=be("REDO_COMMAND"),O0=be("KEYDOWN_COMMAND"),$0=be("KEY_ARROW_RIGHT_COMMAND"),tO=be("MOVE_TO_END"),P0=be("KEY_ARROW_LEFT_COMMAND"),nO=be("MOVE_TO_START"),A0=be("KEY_ARROW_UP_COMMAND"),L0=be("KEY_ARROW_DOWN_COMMAND"),fu=be("KEY_ENTER_COMMAND"),D0=be("KEY_SPACE_COMMAND"),I0=be("KEY_BACKSPACE_COMMAND"),F0=be("KEY_ESCAPE_COMMAND"),z0=be("KEY_DELETE_COMMAND"),R0=be("KEY_TAB_COMMAND"),rO=be("INSERT_TAB_COMMAND"),iO=be("INDENT_CONTENT_COMMAND"),B0=be("OUTDENT_CONTENT_COMMAND"),W0=be("DROP_COMMAND"),Ba=be("FORMAT_ELEMENT_COMMAND"),U0=be("DRAGSTART_COMMAND"),H0=be("DRAGOVER_COMMAND"),aO=be("DRAGEND_COMMAND"),hu=be("COPY_COMMAND"),Nf=be("CUT_COMMAND"),Ef=be("SELECT_ALL_COMMAND"),sO=be("CLEAR_EDITOR_COMMAND"),oO=be("CLEAR_HISTORY_COMMAND"),ao=be("CAN_REDO_COMMAND"),so=be("CAN_UNDO_COMMAND"),lO=be("FOCUS_COMMAND"),uO=be("BLUR_COMMAND"),cO=be("KEY_MODIFIER_COMMAND"),Br=Object.freeze({}),Tf=[["keydown",function(e,t){oo=e.timeStamp,q0=e.key,!t.isComposing()&&pe(t,O0,e)}],["pointerdown",function(e,t){const n=e.target,r=e.pointerType;ns(n)&&r!=="touch"&&r!=="pen"&&e.button===0&&yr(t,()=>{Ux(n)||(jf=!0)})}],["compositionstart",function(e,t){pe(t,M0,e)}],["compositionend",function(e,t){ui?uo=!0:Zs||!eu&&!tu?pe(t,j0,e):(gu=!0,mu=e.data)}],["input",function(e,t){e.stopPropagation(),yr(t,()=>{t.dispatchCommand(C0,e)},{event:e}),Wa=null}],["click",function(e,t){yr(t,()=>{const n=de(),r=On(kn(t)),i=Ya();if(r){if(ie(n)){const a=n.anchor,s=a.getNode();if(a.type==="element"&&a.offset===0&&n.isCollapsed()&&!wt(s)&&lt().getChildrenSize()===1&&s.getTopLevelElementOrThrow().isEmpty()&&i!==null&&n.is(i))r.removeAllRanges(),n.dirty=!0;else if(e.detail===3&&!n.isCollapsed()&&s!==n.focus.getNode()){const o=Rt(s,l=>Q(l)&&!l.isInline());Q(o)&&o.select(0)}}else if(e.pointerType==="touch"||e.pointerType==="pen"){const a=r.anchorNode;(yt(a)||Kr(a))&&Yt(Rf(i,r,t,e))}}pe(t,E0,e)})}],["cut",Br],["copy",Br],["dragstart",Br],["dragover",Br],["dragend",Br],["paste",Br],["focus",Br],["blur",Br],["drop",Br]];Ql&&Tf.push(["beforeinput",(e,t)=>function(n,r){const i=n.inputType;i==="deleteCompositionText"||ui&&sb(r)||i!=="insertCompositionText"&&pe(r,T0,n)}(e,t)]);let oo=0,q0=null,V0=0,Wa=null;const Cf=new WeakMap,pu=new WeakMap;let Mf=!1,jf=!1,lo=!1,uo=!1,gu=!1,mu="",Ji=null,K0=[0,"",0,"root",0];function Y0(e,t,n,r,i){const a=e.anchor,s=e.focus,o=a.getNode(),l=et(),u=On(kn(l)),c=u!==null?u.anchorNode:null,d=a.key,f=l.getElementByKey(d),g=n.length;return d!==s.key||!ce(o)||(!i&&(!Ql||V0<r+50)||o.isDirty()&&g<2||Zx(n))&&a.offset!==s.offset&&!o.isComposing()||Vr(o)||o.isDirty()&&g>1||(i||!Ql)&&f!==null&&!o.isComposing()&&c!==Ja(f)||u!==null&&t!==null&&(!t.collapsed||t.startContainer!==u.anchorNode||t.startOffset!==u.anchorOffset)||!o.isComposing()&&(o.getFormat()!==e.format||o.getStyle()!==e.style)||function(p,m){if(m.isSegmented())return!0;if(!p.isCollapsed())return!1;const v=p.anchor.offset,x=m.getParentOrThrow(),y=ta(m);return v===0?!m.canInsertTextBefore()||!x.canInsertTextBefore()&&!m.isComposing()||y||function(b){const k=b.getPreviousSibling();return(ce(k)||Q(k)&&k.isInline())&&!k.canInsertTextAfter()}(m):v===m.getTextContentSize()&&(!m.canInsertTextAfter()||!x.canInsertTextAfter()&&!m.isComposing()||y)}(e,o)}function G0(e,t){return Kr(e)&&e.nodeValue!==null&&t!==0&&t!==e.nodeValue.length}function X0(e,t,n){const{anchorNode:r,anchorOffset:i,focusNode:a,focusOffset:s}=e;Mf&&(Mf=!1,G0(r,i)&&G0(a,s)&&!Ji)||yr(t,()=>{if(!n)return void Yt(null);if(!go(t,r,a))return;let o=de();if(Ji&&ie(o)&&o.isCollapsed()){const l=o.anchor,u=Ji.anchor;(l.key===u.key&&l.offset===u.offset+1||l.offset===1&&u.getNode().is(l.getNode().getPreviousSibling()))&&(o=Ji.clone(),Yt(o))}if(Ji=null,ie(o)){const l=o.anchor,u=l.getNode();if(o.isCollapsed()){e.type==="Range"&&e.anchorNode===e.focusNode&&(o.dirty=!0);const c=kn(t).event,d=c?c.timeStamp:performance.now(),[f,g,p,m,v]=K0,x=lt(),y=t.isComposing()===!1&&x.getTextContent()==="";if(d<v+200&&l.offset===p&&l.key===m)vu(o,f,g);else if(l.type==="text")ce(u)||ae(141),J0(o,u);else if(l.type==="element"&&!y){Q(u)||ae(259);const b=l.getNode();b.isEmpty()?function(k,w){const S=w.getTextFormat(),N=w.getTextStyle();vu(k,S,N)}(o,b):vu(o,0,"")}}else{const c=l.key,d=o.focus.key,f=o.getNodes(),g=f.length,p=o.isBackward(),m=p?s:i,v=p?i:s,x=p?d:c,y=p?c:d;let b=2047,k=!1;for(let w=0;w<g;w++){const S=f[w],N=S.getTextContentSize();if(ce(S)&&N!==0&&!(w===0&&S.__key===x&&m===N||w===g-1&&S.__key===y&&v===0)&&(k=!0,b&=S.getFormat(),b===0))break}o.format=k?b:0}}pe(t,kf,void 0)})}function vu(e,t,n){e.format===t&&e.style===n||(e.format=t,e.style=n,e.dirty=!0)}function J0(e,t){vu(e,t.getFormat(),t.getStyle())}function Z0(e){if(!e.getTargetRanges)return null;const t=e.getTargetRanges();return t.length===0?null:t[0]}function dO(e){const t=e.inputType,n=Z0(e),r=et(),i=de();if(t==="deleteContentBackward"){if(i===null){const d=Ya();if(!ie(d))return!0;Yt(d.clone())}if(ie(i)){const d=i.anchor.key===i.focus.key;if(a=e.timeStamp,q0==="MediaLast"&&a<oo+30&&r.isComposing()&&d){if(zt(null),oo=0,setTimeout(()=>{yr(r,()=>{zt(null)})},30),ie(i)){const f=i.anchor.getNode();f.markDirty(),ce(f)||ae(142),J0(i,f)}}else{zt(null),e.preventDefault();const f=i.anchor.getNode(),g=f.getTextContent(),p=f.canInsertTextAfter(),m=i.anchor.offset===0&&i.focus.offset===g.length;let v=uf&&d&&!m&&p;if(v&&i.isCollapsed()&&(v=!Re(nh(i.anchor,!0))),!v){pe(r,Xi,!0);const x=de();uf&&ie(x)&&x.isCollapsed()&&(Ji=x,setTimeout(()=>Ji=null))}}return!0}}var a;if(!ie(i))return!0;const s=e.data;Wa!==null&&Qf(!1,r,Wa),i.dirty&&Wa===null||!i.isCollapsed()||wt(i.anchor.getNode())||n===null||i.applyDOMRange(n),Wa=null;const o=i.anchor,l=i.focus,u=o.getNode(),c=l.getNode();if(t==="insertText"||t==="insertTranspose"){if(s===`
273
+ `)e.preventDefault(),pe(r,za,!1);else if(s===nu)e.preventDefault(),pe(r,no,void 0);else if(s==null&&e.dataTransfer){const d=e.dataTransfer.getData("text/plain");e.preventDefault(),i.insertRawText(d)}else s!=null&&Y0(i,n,s,e.timeStamp,!0)?(e.preventDefault(),pe(r,Ra,s)):Wa=s;return V0=e.timeStamp,!0}switch(e.preventDefault(),t){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":pe(r,Ra,e);break;case"insertFromComposition":zt(null),pe(r,Ra,e);break;case"insertLineBreak":zt(null),pe(r,za,!1);break;case"insertParagraph":zt(null),lo&&!Zs?(lo=!1,pe(r,za,!1)):pe(r,no,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":pe(r,uu,e);break;case"deleteByComposition":(function(d,f){return d!==f||Q(d)||Q(f)||!ta(d)||!ta(f)})(u,c)&&pe(r,Sf,e);break;case"deleteByDrag":case"deleteByCut":pe(r,Sf,e);break;case"deleteContent":pe(r,Xi,!1);break;case"deleteWordBackward":pe(r,ro,!0);break;case"deleteWordForward":pe(r,ro,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":pe(r,io,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":pe(r,io,!1);break;case"formatStrikeThrough":pe(r,_n,"strikethrough");break;case"formatBold":pe(r,_n,"bold");break;case"formatItalic":pe(r,_n,"italic");break;case"formatUnderline":pe(r,_n,"underline");break;case"historyUndo":pe(r,cu,void 0);break;case"historyRedo":pe(r,du,void 0)}return!0}function fO(e){if(yt(e.target)&&Ux(e.target))return!0;const t=et(),n=de(),r=e.data,i=Z0(e);if(r!=null&&ie(n)&&Y0(n,i,r,e.timeStamp,!1)){uo&&(yu(t,r),uo=!1);const a=n.anchor.getNode(),s=On(kn(t));if(s===null)return!0;const o=n.isBackward(),l=o?n.anchor.offset:n.focus.offset,u=o?n.focus.offset:n.anchor.offset;Ql&&!n.isCollapsed()&&ce(a)&&s.anchorNode!==null&&a.getTextContent().slice(0,l)+r+a.getTextContent().slice(l+u)===eb(s.anchorNode)||pe(t,Ra,r);const c=r.length;ui&&c>1&&e.inputType==="insertCompositionText"&&!t.isComposing()&&(n.anchor.offset-=c),uf&&t.isComposing()&&(oo=0,zt(null))}else Qf(!1,t,r!==null?r:void 0),uo&&(yu(t,r||void 0),uo=!1);return function(){Ft();const a=et();u0(a)}(),!0}function hO(e){const t=et(),n=de();if(ie(n)&&!t.isComposing()){const r=n.anchor,i=n.anchor.getNode();zt(r.key),rh(ax),(e.timeStamp<oo+30||r.type==="element"||!n.isCollapsed()||i.getFormat()!==n.format||ce(i)&&i.getStyle()!==n.style)&&pe(t,Ra,cf)}return!0}function pO(e){return yu(et(),e.data),rh(sx),!0}function yu(e,t){const n=e._compositionKey;if(zt(null),n!==null&&t!=null){if(t===""){const r=kt(n),i=Ja(e.getElementByKey(n));if(i!==null&&i.nodeValue!==null&&ce(r)){const a=On(kn(e));let s=null,o=null;a!==null&&a.anchorNode===i&&(s=a.anchorOffset,o=a.focusOffset),eh(r,i.nodeValue,s,o,!0)}return}if(t[t.length-1]===`
274
+ `){const r=de();if(ie(r)||Kt(r)){if(ie(r)){const i=r.focus;r.anchor.set(i.key,i.offset,i.type)}return void pe(e,fu,null)}}}Qf(!0,e,t)}function gO(e){const t=et();if(e.key==null)return!0;if(gu){if(rb(e))return yr(t,()=>{yu(t,mu)}),gu=!1,mu="",!0;gu=!1,mu=""}if(function(n){return Ye(n,"ArrowRight",{shiftKey:"any"})}(e))pe(t,$0,e);else if(function(n){return Ye(n,"ArrowRight",Yr)}(e))pe(t,tO,e);else if(function(n){return Ye(n,"ArrowLeft",{shiftKey:"any"})}(e))pe(t,P0,e);else if(function(n){return Ye(n,"ArrowLeft",Yr)}(e))pe(t,nO,e);else if(function(n){return Ye(n,"ArrowUp",{altKey:"any",shiftKey:"any"})}(e))pe(t,A0,e);else if(function(n){return Ye(n,"ArrowDown",{altKey:"any",shiftKey:"any"})}(e))pe(t,L0,e);else if(function(n){return Ye(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(e))lo=!0,pe(t,fu,e);else if(function(n){return n.key===" "}(e))pe(t,D0,e);else if(function(n){return Zn&&Ye(n,"o",{ctrlKey:!0})}(e))e.preventDefault(),lo=!0,pe(t,za,!0);else if(function(n){return Ye(n,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(e))lo=!1,pe(t,fu,e);else if(function(n){return Ye(n,"Backspace",{shiftKey:"any"})||Zn&&Ye(n,"h",{ctrlKey:!0})}(e))rb(e)?pe(t,I0,e):(e.preventDefault(),pe(t,Xi,!0));else if(function(n){return n.key==="Escape"}(e))pe(t,F0,e);else if(function(n){return Ye(n,"Delete",{})||Zn&&Ye(n,"d",{ctrlKey:!0})}(e))(function(n){return n.key==="Delete"})(e)?pe(t,z0,e):(e.preventDefault(),pe(t,Xi,!1));else if(function(n){return Ye(n,"Backspace",nb)}(e))e.preventDefault(),pe(t,ro,!0);else if(function(n){return Ye(n,"Delete",nb)}(e))e.preventDefault(),pe(t,ro,!1);else if(function(n){return Zn&&Ye(n,"Backspace",{metaKey:!0})}(e))e.preventDefault(),pe(t,io,!0);else if(function(n){return Zn&&(Ye(n,"Delete",{metaKey:!0})||Ye(n,"k",{ctrlKey:!0}))}(e))e.preventDefault(),pe(t,io,!1);else if(function(n){return Ye(n,"b",Yr)}(e))e.preventDefault(),pe(t,_n,"bold");else if(function(n){return Ye(n,"u",Yr)}(e))e.preventDefault(),pe(t,_n,"underline");else if(function(n){return Ye(n,"i",Yr)}(e))e.preventDefault(),pe(t,_n,"italic");else if(function(n){return Ye(n,"Tab",{shiftKey:"any"})}(e))pe(t,R0,e);else if(function(n){return Ye(n,"z",Yr)}(e))e.preventDefault(),pe(t,cu,void 0);else if(function(n){return Zn?Ye(n,"z",{metaKey:!0,shiftKey:!0}):Ye(n,"y",{ctrlKey:!0})||Ye(n,"z",{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),pe(t,du,void 0);else{const n=t._editorState._selection;n===null||ie(n)?ib(e)&&(e.preventDefault(),pe(t,Ef,e)):function(r){return Ye(r,"c",Yr)}(e)?(e.preventDefault(),pe(t,hu,e)):function(r){return Ye(r,"x",Yr)}(e)?(e.preventDefault(),pe(t,Nf,e)):ib(e)&&(e.preventDefault(),pe(t,Ef,e))}return function(n){return n.ctrlKey||n.shiftKey||n.altKey||n.metaKey}(e)&&t.dispatchCommand(cO,e),!0}function Q0(e){let t=e.__lexicalEventHandles;return t===void 0&&(t=[],e.__lexicalEventHandles=t),t}const Ua=new Map;function ex(e){const t=VO(e.target);if(t===null)return;const n=Hx(t.anchorNode);if(n===null)return;jf&&(jf=!1,yr(n,()=>{const l=Ya(),u=t.anchorNode;(yt(u)||Kr(u))&&Yt(Rf(l,t,n,e))}));const r=Zf(n),i=r[r.length-1],a=i._key,s=Ua.get(a),o=s||i;o!==n&&X0(t,o,!1),X0(t,n,!0),n!==i?Ua.set(a,n):s&&Ua.delete(a)}function tx(e){e._lexicalHandled=!0}function nx(e){return e._lexicalHandled===!0}function mO(e){const t=Cf.get(e);if(t===void 0)return;const n=pu.get(t);if(n===void 0)return;const r=n-1;r>=0||ae(164),Cf.delete(e),pu.set(t,r),r===0&&t.removeEventListener("selectionchange",ex);const i=Cu(e);Jf(i)?(function(s){if(s._parentEditor!==null){const o=Zf(s),l=o[o.length-1]._key;Ua.get(l)===s&&Ua.delete(l)}else Ua.delete(s._key)}(i),e.__lexicalEditor=null):i&&ae(198);const a=Q0(e);for(let s=0;s<a.length;s++)a[s]();e.__lexicalEventHandles=[]}function Of(e,t,n){Ft();const r=e.__key,i=e.getParent();if(i===null)return;const a=function(o){const l=de();if(!ie(l)||!Q(o))return l;const{anchor:u,focus:c}=l,d=u.getNode(),f=c.getNode();return ih(d,o)&&u.set(o.__key,0,"element"),ih(f,o)&&c.set(o.__key,0,"element"),l}(e);let s=!1;if(ie(a)&&t){const o=a.anchor,l=a.focus;o.key===r&&(Nu(o,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0),l.key===r&&(Nu(l,e,i,e.getPreviousSibling(),e.getNextSibling()),s=!0)}else Kt(a)&&t&&e.isSelected()&&e.selectPrevious();if(ie(a)&&t&&!s){const o=e.getIndexWithinParent();na(e),Su(a,i,o,-1)}else na(e);n||fn(i)||i.canBeEmpty()||!i.isEmpty()||Of(i,t),t&&a&&wt(i)&&i.isEmpty()&&i.selectEnd()}function G7(e){return e}const rx=Symbol.for("ephemeral");function xu(e){return e[rx]||!1}class er{constructor(t){ee(this,"__type");ee(this,"__key");ee(this,"__parent");ee(this,"__prev");ee(this,"__next");ee(this,"__state");this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),Kx(this,t)}static getType(){const{ownNodeType:t}=Lu(this);return t===void 0&&ae(64,this.name),t}static clone(t){ae(65,this.name)}$config(){return{}}config(t,n){const r=n.extends||Object.getPrototypeOf(this.constructor);return Object.assign(n,{extends:r,type:t}),{[t]:n}}afterCloneFrom(t){this.__key===t.__key?(this.__parent=t.__parent,this.__next=t.__next,this.__prev=t.__prev,this.__state=t.__state):t.__state&&(this.__state=t.__state.getWritable(this))}getType(){return this.__type}isInline(){ae(137,this.constructor.name)}isAttached(){let t=this.__key;for(;t!==null;){if(t==="root")return!0;const n=kt(t);if(n===null)break;t=n.__parent}return!1}isSelected(t){const n=t||de();if(n==null)return!1;const r=n.getNodes().some(i=>i.__key===this.__key);if(ce(this))return r;if(ie(n)&&n.anchor.type==="element"&&n.focus.type==="element"){if(n.isCollapsed())return!1;const i=this.getParent();if(Re(this)&&this.isInline()&&i){const a=n.isBackward()?n.focus:n.anchor;if(i.is(a.getNode())&&a.offset===i.getChildrenSize()&&this.is(i.getLastChild()))return!1}}return r}getKey(){return this.__key}getIndexWithinParent(){const t=this.getParent();if(t===null)return-1;let n=t.getFirstChild(),r=0;for(;n!==null;){if(this.is(n))return r;r++,n=n.getNextSibling()}return-1}getParent(){const t=this.getLatest().__parent;return t===null?null:kt(t)}getParentOrThrow(){const t=this.getParent();return t===null&&ae(66,this.__key),t}getTopLevelElement(){let t=this;for(;t!==null;){const n=t.getParent();if(fn(n))return Q(t)||t===this&&Re(t)||ae(194),t;t=n}return null}getTopLevelElementOrThrow(){const t=this.getTopLevelElement();return t===null&&ae(67,this.__key),t}getParents(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n),n=n.getParent();return t}getParentKeys(){const t=[];let n=this.getParent();for(;n!==null;)t.push(n.__key),n=n.getParent();return t}getPreviousSibling(){const t=this.getLatest().__prev;return t===null?null:kt(t)}getPreviousSiblings(){const t=[],n=this.getParent();if(n===null)return t;let r=n.getFirstChild();for(;r!==null&&!r.is(this);)t.push(r),r=r.getNextSibling();return t}getNextSibling(){const t=this.getLatest().__next;return t===null?null:kt(t)}getNextSiblings(){const t=[];let n=this.getNextSibling();for(;n!==null;)t.push(n),n=n.getNextSibling();return t}getCommonAncestor(t){const n=Q(this)?this:this.getParent(),r=Q(t)?t:t.getParent(),i=n&&r?Iu(n,r):null;return i?i.commonAncestor:null}is(t){return t!=null&&this.__key===t.__key}isBefore(t){const n=Iu(this,t);return n!==null&&(n.type==="descendant"||(n.type==="branch"?mb(n)===-1:(n.type!=="same"&&n.type!=="ancestor"&&ae(279),!1)))}isParentOf(t){const n=Iu(this,t);return n!==null&&n.type==="ancestor"}getNodesBetween(t){const n=this.isBefore(t),r=[],i=new Set;let a=this;for(;a!==null;){const s=a.__key;if(i.has(s)||(i.add(s),r.push(a)),a===t)break;const o=Q(a)?n?a.getFirstChild():a.getLastChild():null;if(o!==null){a=o;continue}const l=n?a.getNextSibling():a.getPreviousSibling();if(l!==null){a=l;continue}const u=a.getParentOrThrow();if(i.has(u.__key)||r.push(u),u===t)break;let c=null,d=u;do{if(d===null&&ae(68),c=n?d.getNextSibling():d.getPreviousSibling(),d=d.getParent(),d===null)break;c!==null||i.has(d.__key)||r.push(d)}while(c===null);a=c}return n||r.reverse(),r}isDirty(){const t=et()._dirtyLeaves;return t!==null&&t.has(this.__key)}getLatest(){if(xu(this))return this;const t=kt(this.__key);return t===null&&ae(113),t}getWritable(){if(xu(this))return this;Ft();const t=ci(),n=et(),r=t._nodeMap,i=this.__key,a=this.getLatest(),s=n._cloneNotNeeded,o=de();if(o!==null&&o.setCachedNodes(null),s.has(i))return ju(a),a;const l=fb(a);return s.add(i),ju(l),r.set(i,l),l}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(t,n){ae(70)}updateDOM(t,n,r){ae(71)}exportDOM(t){return{element:this.createDOM(t._config,t)}}exportJSON(){const t=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...t}}static importJSON(t){ae(18,this.name)}updateFromJSON(t){return function(n,r){const i=n.getWritable(),a=r.$;let s=a;for(const o of d0(i).flatKeys)o in r&&(s!==void 0&&s!==a||(s={...a}),s[o]=r[o]);return(i.__state||s)&&Gj(n).updateFromJSON(s),i}(this,t)}static transform(){return null}remove(t){Of(this,!0,t)}replace(t,n){Ft();let r=de();r!==null&&(r=r.clone()),sh(this,t);const i=this.getLatest(),a=this.__key,s=t.__key,o=t.getWritable(),l=this.getParentOrThrow().getWritable(),u=l.__size;na(o);const c=i.getPreviousSibling(),d=i.getNextSibling(),f=i.__prev,g=i.__next,p=i.__parent;if(Of(i,!1,!0),c===null?l.__first=s:c.getWritable().__next=s,o.__prev=f,d===null?l.__last=s:d.getWritable().__prev=s,o.__next=g,o.__parent=p,l.__size=u,n&&(Q(this)&&Q(o)||ae(139),this.getChildren().forEach(m=>{o.append(m)})),ie(r)){Yt(r);const m=r.anchor,v=r.focus;m.key===a&&fx(m,o),v.key===a&&fx(v,o)}return di()===a&&zt(s),o}insertAfter(t,n=!0){Ft(),sh(this,t);const r=this.getWritable(),i=t.getWritable(),a=i.getParent(),s=de();let o=!1,l=!1;if(a!==null){const g=t.getIndexWithinParent();if(na(i),ie(s)){const p=a.__key,m=s.anchor,v=s.focus;o=m.type==="element"&&m.key===p&&m.offset===g+1,l=v.type==="element"&&v.key===p&&v.offset===g+1}}const u=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=i.__key,f=r.__next;if(u===null?c.__last=d:u.getWritable().__prev=d,c.__size++,r.__next=d,i.__next=f,i.__prev=r.__key,i.__parent=r.__parent,n&&ie(s)){const g=this.getIndexWithinParent();Su(s,c,g+1);const p=c.__key;o&&s.anchor.set(p,g+2,"element"),l&&s.focus.set(p,g+2,"element")}return t}insertBefore(t,n=!0){Ft(),sh(this,t);const r=this.getWritable(),i=t.getWritable(),a=i.__key;na(i);const s=this.getPreviousSibling(),o=this.getParentOrThrow().getWritable(),l=r.__prev,u=this.getIndexWithinParent();s===null?o.__first=a:s.getWritable().__next=a,o.__size++,r.__prev=a,i.__prev=l,i.__next=r.__key,i.__parent=r.__parent;const c=de();return n&&ie(c)&&Su(c,this.getParentOrThrow(),u),t}isParentRequired(){return!1}createParentElementNode(){return tt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(t,n){Ft();const r=this.getPreviousSibling(),i=this.getParentOrThrow();if(r===null)return i.select(0,0);if(Q(r))return r.select();if(!ce(r)){const a=r.getIndexWithinParent()+1;return i.select(a,a)}return r.select(t,n)}selectNext(t,n){Ft();const r=this.getNextSibling(),i=this.getParentOrThrow();if(r===null)return i.select();if(Q(r))return r.select(0,0);if(!ce(r)){const a=r.getIndexWithinParent();return i.select(a,a)}return r.select(t,n)}markDirty(){this.getWritable()}reconcileObservedMutation(t,n){this.markDirty()}}ee(er,"importDOM");const $f="historic",vO="history-push",Zi="history-merge",yO="paste",xO="collaboration",bO="skip-scroll-into-view",_O="skip-dom-selection",ix="skip-selection-focus",ax="composition-start",sx="composition-end";class Ha extends er{static getType(){return"linebreak"}static clone(t){return new Ha(t.__key)}constructor(t){super(t)}getTextContent(){return`
275
+ `}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:t=>function(n){const r=n.parentElement;if(r!==null&&Pu(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&bu(i)){const a=r.lastChild;if(a===n||a.previousSibling===n&&bu(a))return!0}}return!1}(t)||function(n){const r=n.parentElement;if(r!==null&&Pu(r)){const i=r.firstChild;if(i===n||i.nextSibling===n&&bu(i))return!1;const a=r.lastChild;if(a===n||a.previousSibling===n&&bu(a))return!0}return!1}(t)?null:{conversion:wO,priority:0}}}static importJSON(t){return Wr().updateFromJSON(t)}}function wO(e){return{node:Wr()}}function Wr(){return tr(new Ha)}function qa(e){return e instanceof Ha}function bu(e){return Kr(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function Pf(e,t){return 16&t?"code":t&a0?"mark":32&t?"sub":64&t?"sup":null}function Af(e,t){return 1&t?"strong":2&t?"em":"span"}function ox(e,t,n,r,i){const a=r.classList;let s=es(i,"base");s!==void 0&&a.add(...s),s=es(i,"underlineStrikethrough");let o=!1;const l=8&t&&4&t;s!==void 0&&(8&n&&4&n?(o=!0,l||a.add(...s)):l&&a.remove(...s));for(const u in Hi){const c=Hi[u];if(s=es(i,u),s!==void 0)if(n&c){if(o&&(u==="underline"||u==="strikethrough")){t&c&&a.remove(...s);continue}(!(t&c)||l&&u==="underline"||u==="strikethrough")&&a.add(...s)}else t&c&&a.remove(...s)}}function lx(e,t,n){const r=t.firstChild,i=n.isComposing(),a=e+(i?Qs:"");if(r==null)t.textContent=a;else{const s=r.nodeValue;if(s!==a)if(i||ui){const[o,l,u]=function(c,d){const f=c.length,g=d.length;let p=0,m=0;for(;p<f&&p<g&&c[p]===d[p];)p++;for(;m+p<f&&m+p<g&&c[f-m-1]===d[g-m-1];)m++;return[p,f-p-m,d.slice(p,g-m)]}(s,a);l!==0&&r.deleteData(o,l),r.insertData(o,u)}else r.nodeValue=a}}function ux(e,t,n,r,i,a){lx(i,e,t);const s=a.theme.text;s!==void 0&&ox(0,0,r,e,s)}function _u(e,t){const n=document.createElement(t);return n.appendChild(e),n}class Ur extends er{constructor(n="",r){super(r);ee(this,"__text");ee(this,"__format");ee(this,"__style");ee(this,"__mode");ee(this,"__detail");this.__text=n,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}static getType(){return"text"}static clone(n){return new Ur(n.__text,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__text=n.__text,this.__format=n.__format,this.__style=n.__style,this.__mode=n.__mode,this.__detail=n.__detail}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){const n=this.getLatest();return Rj[n.__mode]}getStyle(){return this.getLatest().__style}isToken(){return this.getLatest().__mode===1}isComposing(){return this.__key===di()}isSegmented(){return this.getLatest().__mode===2}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(n){const r=Hi[n];return(this.getFormat()&r)!==0}isSimpleText(){return this.__type==="text"&&this.__mode===0}getTextContent(){return this.getLatest().__text}getFormatFlags(n,r){return Mu(this.getLatest().__format,n,r)}canHaveFormat(){return!0}isInline(){return!0}createDOM(n,r){const i=this.__format,a=Pf(0,i),s=Af(0,i),o=a===null?s:a,l=document.createElement(o);let u=l;this.hasFormat("code")&&l.setAttribute("spellcheck","false"),a!==null&&(u=document.createElement(s),l.appendChild(u)),ux(u,this,0,i,this.__text,n);const c=this.__style;return c!==""&&(l.style.cssText=c),l}updateDOM(n,r,i){const a=this.__text,s=n.__format,o=this.__format,l=Pf(0,s),u=Pf(0,o),c=Af(0,s),d=Af(0,o);if((l===null?c:l)!==(u===null?d:u))return!0;if(l===u&&c!==d){const v=r.firstChild;v==null&&ae(48);const x=document.createElement(d);return ux(x,this,0,o,a,i),r.replaceChild(x,v),!1}let f=r;u!==null&&l!==null&&(f=r.firstChild,f==null&&ae(49)),lx(a,f,this);const g=i.theme.text;g!==void 0&&s!==o&&ox(0,s,o,f,g);const p=n.__style,m=this.__style;return p!==m&&(r.style.cssText=m),!1}static importDOM(){return{"#text":()=>({conversion:EO,priority:0}),b:()=>({conversion:SO,priority:0}),code:()=>({conversion:Hr,priority:0}),em:()=>({conversion:Hr,priority:0}),i:()=>({conversion:Hr,priority:0}),mark:()=>({conversion:Hr,priority:0}),s:()=>({conversion:Hr,priority:0}),span:()=>({conversion:kO,priority:0}),strong:()=>({conversion:Hr,priority:0}),sub:()=>({conversion:Hr,priority:0}),sup:()=>({conversion:Hr,priority:0}),u:()=>({conversion:Hr,priority:0})}}static importJSON(n){return Ot().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTextContent(n.text).setFormat(n.format).setDetail(n.detail).setMode(n.mode).setStyle(n.style)}exportDOM(n){let{element:r}=super.exportDOM(n);return yt(r)||ae(132),r.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?r.style.textTransform="lowercase":this.hasFormat("uppercase")?r.style.textTransform="uppercase":this.hasFormat("capitalize")&&(r.style.textTransform="capitalize"),this.hasFormat("bold")&&(r=_u(r,"b")),this.hasFormat("italic")&&(r=_u(r,"i")),this.hasFormat("strikethrough")&&(r=_u(r,"s")),this.hasFormat("underline")&&(r=_u(r,"u")),{element:r}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(n,r){}setFormat(n){const r=this.getWritable();return r.__format=typeof n=="string"?Hi[n]:n,r}setDetail(n){const r=this.getWritable();return r.__detail=typeof n=="string"?Ij[n]:n,r}setStyle(n){const r=this.getWritable();return r.__style=n,r}toggleFormat(n){const r=Mu(this.getFormat(),n,null);return this.setFormat(r)}toggleDirectionless(){const n=this.getWritable();return n.__detail^=1,n}toggleUnmergeable(){const n=this.getWritable();return n.__detail^=2,n}setMode(n){const r=zj[n];if(this.__mode===r)return this;const i=this.getWritable();return i.__mode=r,i}setTextContent(n){if(this.__text===n)return this;const r=this.getWritable();return r.__text=n,r}select(n,r){Ft();let i=n,a=r;const s=de(),o=this.getTextContent(),l=this.__key;if(typeof o=="string"){const u=o.length;i===void 0&&(i=u),a===void 0&&(a=u)}else i=0,a=0;if(!ie(s))return bx(l,i,l,a,"text","text");{const u=di();u!==s.anchor.key&&u!==s.focus.key||zt(l),s.setTextNodeRange(this,i,this,a)}return s}selectStart(){return this.select(0,0)}selectEnd(){const n=this.getTextContentSize();return this.select(n,n)}spliceText(n,r,i,a){const s=this.getWritable(),o=s.__text,l=i.length;let u=n;u<0&&(u=l+u,u<0&&(u=0));const c=de();if(a&&ie(c)){const f=n+l;c.setTextNodeRange(s,f,s,f)}const d=o.slice(0,u)+i+o.slice(u+r);return s.__text=d,s}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...n){Ft();const r=this.getLatest(),i=r.getTextContent();if(i==="")return[];const a=r.__key,s=di(),o=i.length;n.sort((T,C)=>T-C),n.push(o);const l=[],u=n.length;for(let T=0,C=0;T<o&&C<=u;C++){const O=n[C];O>T&&(l.push(i.slice(T,O)),T=O)}const c=l.length;if(c===1)return[r];const d=l[0],f=r.getParent();let g;const p=r.getFormat(),m=r.getStyle(),v=r.__detail;let x=!1,y=null,b=null;const k=de();if(ie(k)){const[T,C]=k.isBackward()?[k.focus,k.anchor]:[k.anchor,k.focus];T.type==="text"&&T.key===a&&(y=T),C.type==="text"&&C.key===a&&(b=C)}r.isSegmented()?(g=Ot(d),g.__format=p,g.__style=m,g.__detail=v,g.__state=g0(r,g),x=!0):g=r.setTextContent(d);const w=[g];for(let T=1;T<c;T++){const C=Ot(l[T]);C.__format=p,C.__style=m,C.__detail=v,C.__state=g0(r,C);const O=C.__key;s===a&&zt(O),w.push(C)}const S=y?y.offset:null,N=b?b.offset:null;let E=0;for(const T of w){if(!y&&!b)break;const C=E+T.getTextContentSize();if(y!==null&&S!==null&&S<=C&&S>=E&&(y.set(T.getKey(),S-E,"text"),S<C&&(y=null)),b!==null&&N!==null&&N<=C&&N>=E){b.set(T.getKey(),N-E,"text");break}E=C}if(f!==null){(function(O){const $=O.getPreviousSibling(),M=O.getNextSibling();$!==null&&ju($),M!==null&&ju(M)})(this);const T=f.getWritable(),C=this.getIndexWithinParent();x?(T.splice(C,0,w),this.remove()):T.splice(C,1,w),ie(k)&&Su(k,f,C,c-1)}return w}mergeWithSibling(n){const r=n===this.getPreviousSibling();r||n===this.getNextSibling()||ae(50);const i=this.__key,a=n.__key,s=this.__text,o=s.length;di()===a&&zt(i);const l=de();if(ie(l)){const f=l.anchor,g=l.focus;f!==null&&f.key===a&&kx(f,r,i,n,o),g!==null&&g.key===a&&kx(g,r,i,n,o)}const u=n.__text,c=r?u+s:s+u;this.setTextContent(c);const d=this.getWritable();return n.remove(),d}isTextEntity(){return!1}}function kO(e){return{forChild:Lf(e.style),node:null}}function SO(e){const t=e,n=t.style.fontWeight==="normal";return{forChild:Lf(t.style,n?void 0:"bold"),node:null}}const cx=new WeakMap;function NO(e){if(!yt(e))return!1;if(e.nodeName==="PRE")return!0;const t=e.style.whiteSpace;return typeof t=="string"&&t.startsWith("pre")}function EO(e){const t=e;e.parentElement===null&&ae(129);let n=t.textContent||"";if(function(r){let i,a=r.parentNode;const s=[r];for(;a!==null&&(i=cx.get(a))===void 0&&!NO(a);)s.push(a),a=a.parentNode;const o=i===void 0?a:i;for(let l=0;l<s.length;l++)cx.set(s[l],o);return o}(t)!==null){const r=n.split(/(\r?\n|\t)/),i=[],a=r.length;for(let s=0;s<a;s++){const o=r[s];o===`
276
+ `||o===`\r
277
+ `?i.push(Wr()):o===" "?i.push(Ka()):o!==""&&i.push(Ot(o))}return{node:i}}if(n=n.replace(/\r/g,"").replace(/[ \t\n]+/g," "),n==="")return{node:null};if(n[0]===" "){let r=t,i=!0;for(;r!==null&&(r=dx(r,!1))!==null;){const a=r.textContent||"";if(a.length>0){/[ \t\n]$/.test(a)&&(n=n.slice(1)),i=!1;break}}i&&(n=n.slice(1))}if(n[n.length-1]===" "){let r=t,i=!0;for(;r!==null&&(r=dx(r,!0))!==null;)if((r.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){i=!1;break}i&&(n=n.slice(0,n.length-1))}return n===""?{node:null}:{node:Ot(n)}}function dx(e,t){let n=e;for(;;){let r;for(;(r=t?n.nextSibling:n.previousSibling)===null;){const a=n.parentElement;if(a===null)return null;n=a}if(n=r,yt(n)){const a=n.style.display;if(a===""&&!ch(n)||a!==""&&!a.startsWith("inline"))return null}let i=n;for(;(i=t?n.firstChild:n.lastChild)!==null;)n=i;if(Kr(n))return n;if(n.nodeName==="BR")return null}}const TO={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function Hr(e){const t=TO[e.nodeName.toLowerCase()];return t===void 0?{node:null}:{forChild:Lf(e.style,t),node:null}}function Ot(e=""){return tr(new Ur(e))}function ce(e){return e instanceof Ur}function Lf(e,t){const n=e.fontWeight,r=e.textDecoration.split(" "),i=n==="700"||n==="bold",a=r.includes("line-through"),s=e.fontStyle==="italic",o=r.includes("underline"),l=e.verticalAlign;return u=>(ce(u)&&(i&&!u.hasFormat("bold")&&u.toggleFormat("bold"),a&&!u.hasFormat("strikethrough")&&u.toggleFormat("strikethrough"),s&&!u.hasFormat("italic")&&u.toggleFormat("italic"),o&&!u.hasFormat("underline")&&u.toggleFormat("underline"),l!=="sub"||u.hasFormat("subscript")||u.toggleFormat("subscript"),l!=="super"||u.hasFormat("superscript")||u.toggleFormat("superscript"),t&&!u.hasFormat(t)&&u.toggleFormat(t)),u)}class Va extends Ur{static getType(){return"tab"}static clone(t){return new Va(t.__key)}constructor(t){super(" ",t),this.__detail=2}static importDOM(){return null}createDOM(t){const n=super.createDOM(t),r=es(t.theme,"tab");return r!==void 0&&n.classList.add(...r),n}static importJSON(t){return Ka().updateFromJSON(t)}setTextContent(t){return t!==" "&&t!==""&&r0(126),super.setTextContent(" ")}spliceText(t,n,r,i){return r===""&&n===0||r===" "&&n===1||ae(286),this}setDetail(t){return t!==2&&ae(127),this}setMode(t){return t!=="normal"&&ae(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function Ka(){return tr(new Va)}function wu(e){return e instanceof Va}class CO{constructor(t,n,r){ee(this,"key");ee(this,"offset");ee(this,"type");ee(this,"_selection");this._selection=null,this.key=t,this.offset=n,this.type=r}is(t){return this.key===t.key&&this.offset===t.offset&&this.type===t.type}isBefore(t){return this.key===t.key?this.offset<t.offset:gb(Sn(wr(this,"next")),Sn(wr(t,"next")))<0}getNode(){const t=kt(this.key);return t===null&&ae(20),t}set(t,n,r,i){const a=this._selection,s=this.key;i&&this.key===t&&this.offset===n&&this.type===r||(this.key=t,this.offset=n,this.type=r,co()||(di()===s&&zt(t),a!==null&&(a.setCachedNodes(null),a.dirty=!0)))}}function vr(e,t,n){return new CO(e,t,n)}function Df(e,t){let n=t.__key,r=e.offset,i="element";if(ce(t)){i="text";const a=t.getTextContentSize();r>a&&(r=a)}else if(!Q(t)){const a=t.getNextSibling();if(ce(a))n=a.__key,r=0,i="text";else{const s=t.getParent();s&&(n=s.__key,r=t.getIndexWithinParent()+1)}}e.set(n,r,i)}function fx(e,t){if(Q(t)){const n=t.getLastDescendant();Q(n)||ce(n)?Df(e,n):Df(e,t)}else Df(e,t)}class ku{constructor(t){ee(this,"_nodes");ee(this,"_cachedNodes");ee(this,"dirty");this._cachedNodes=null,this._nodes=t,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){if(!Kt(t))return!1;const n=this._nodes,r=t._nodes;return n.size===r.size&&Array.from(n).every(i=>r.has(i))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(t){this.dirty=!0,this._nodes.add(t),this._cachedNodes=null}delete(t){this.dirty=!0,this._nodes.delete(t),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(t){return this._nodes.has(t)}clone(){return new ku(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(t){}insertText(){}insertNodes(t){const n=this.getNodes(),r=n.length,i=n[r-1];let a;if(ce(i))a=i.select();else{const s=i.getIndexWithinParent()+1;a=i.getParentOrThrow().select(s,s)}a.insertNodes(t);for(let s=0;s<r;s++)n[s].remove()}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=this._nodes,r=[];for(const i of n){const a=kt(i);a!==null&&r.push(a)}return co()||(this._cachedNodes=r),r}getTextContent(){const t=this.getNodes();let n="";for(let r=0;r<t.length;r++)n+=t[r].getTextContent();return n}deleteNodes(){const t=this.getNodes();if((de()||Ya())===this&&t[0]){const n=St(t[0],"next");a$(fi(n,n))}for(const n of t)n.remove()}}function ie(e){return e instanceof Qi}class Qi{constructor(t,n,r,i){ee(this,"format");ee(this,"style");ee(this,"anchor");ee(this,"focus");ee(this,"_cachedNodes");ee(this,"dirty");this.anchor=t,this.focus=n,t._selection=this,n._selection=this,this._cachedNodes=null,this.format=r,this.style=i,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(t){this._cachedNodes=t}is(t){return!!ie(t)&&this.anchor.is(t.anchor)&&this.focus.is(t.focus)&&this.format===t.format&&this.style===t.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){const t=this._cachedNodes;if(t!==null)return t;const n=function(r){const i=[],[a,s]=r.getTextSlices();a&&i.push(a.caret.origin);const o=new Set,l=new Set;for(const u of r)if(nr(u)){const{origin:c}=u;i.length===0?o.add(c):(l.add(c),i.push(c))}else{const{origin:c}=u;Q(c)&&l.has(c)||i.push(c)}if(s&&i.push(s.caret.origin),rs(r.focus)&&Q(r.focus.origin)&&r.focus.getNodeAtCaret()===null)for(let u=Pn(r.focus.origin,"previous");nr(u)&&o.has(u.origin)&&!u.origin.isEmpty()&&u.origin.is(i[i.length-1]);u=ph(u))o.delete(u.origin),i.pop();for(;i.length>1;){const u=i[i.length-1];if(!Q(u)||l.has(u)||u.isEmpty()||o.has(u))break;i.pop()}if(i.length===0&&r.isCollapsed()){const u=Sn(r.anchor),c=Sn(r.anchor.getFlipped()),d=g=>br(g)?g.origin:g.getNodeAtCaret(),f=d(u)||d(c)||(r.anchor.getNodeAtCaret()?u.origin:c.origin);i.push(f)}return i}(_b(yb(this),"next"));return co()||(this._cachedNodes=n),n}setTextNodeRange(t,n,r,i){this.anchor.set(t.__key,n,"text"),this.focus.set(r.__key,i,"text")}getTextContent(){const t=this.getNodes();if(t.length===0)return"";const n=t[0],r=t[t.length-1],i=this.anchor,a=this.focus,s=i.isBefore(a),[o,l]=If(this);let u="",c=!0;for(let d=0;d<t.length;d++){const f=t[d];if(Q(f)&&!f.isInline())c||(u+=`
278
+ `),c=!f.isEmpty();else if(c=!1,ce(f)){let g=f.getTextContent();f===n?f===r?i.type==="element"&&a.type==="element"&&a.offset!==i.offset||(g=o<l?g.slice(o,l):g.slice(l,o)):g=s?g.slice(o):g.slice(l):f===r&&(g=s?g.slice(0,l):g.slice(0,o)),u+=g}else!Re(f)&&!qa(f)||f===r&&this.isCollapsed()||(u+=f.getTextContent())}return u}applyDOMRange(t){const n=et(),r=n.getEditorState()._selection,i=xx(t.startContainer,t.startOffset,t.endContainer,t.endOffset,n,r);if(i===null)return;const[a,s]=i;this.anchor.set(a.key,a.offset,a.type,!0),this.focus.set(s.key,s.offset,s.type,!0),qi(this)}clone(){const t=this.anchor,n=this.focus;return new Qi(vr(t.key,t.offset,t.type),vr(n.key,n.offset,n.type),this.format,this.style)}toggleFormat(t){this.format=Mu(this.format,t,null),this.dirty=!0}setFormat(t){this.format=t,this.dirty=!0}setStyle(t){this.style=t,this.dirty=!0}hasFormat(t){const n=Hi[t];return(this.format&n)!==0}insertRawText(t){const n=t.split(/(\r?\n|\t)/),r=[],i=n.length;for(let a=0;a<i;a++){const s=n[a];s===`
279
+ `||s===`\r
280
+ `?r.push(Wr()):s===" "?r.push(Ka()):r.push(Ot(s))}this.insertNodes(r)}insertText(t){const n=this.anchor,r=this.focus,i=this.format,a=this.style;let s=n,o=r;!this.isCollapsed()&&r.isBefore(n)&&(s=r,o=n),s.type==="element"&&function(v,x,y,b){const k=v.getNode(),w=k.getChildAtIndex(v.offset),S=Ot();if(S.setFormat(y),S.setStyle(b),Vf(w))w.splice(0,0,[S]);else{const N=wt(k)?tt().append(S):S;w===null?k.append(N):w.insertBefore(N)}v.is(x)&&x.set(S.__key,0,"text"),v.set(S.__key,0,"text")}(s,o,i,a),o.type==="element"&&hi(o,Sn(wr(o,"next")));const l=s.offset;let u=o.offset;const c=this.getNodes(),d=c.length;let f=c[0];ce(f)||ae(26);const g=f.getTextContent().length,p=f.getParentOrThrow();let m=c[d-1];if(d===1&&o.type==="element"&&(u=g,o.set(s.key,u,"text")),this.isCollapsed()&&l===g&&(Vr(f)||!f.canInsertTextAfter()||!p.canInsertTextAfter()&&f.getNextSibling()===null)){let v=f.getNextSibling();if(ce(v)&&v.canInsertTextBefore()&&!Vr(v)||(v=Ot(),v.setFormat(i),v.setStyle(a),p.canInsertTextAfter()?f.insertAfter(v):p.insertAfter(v)),v.select(0,0),f=v,t!=="")return void this.insertText(t)}else if(this.isCollapsed()&&l===0&&(Vr(f)||!f.canInsertTextBefore()||!p.canInsertTextBefore()&&f.getPreviousSibling()===null)){let v=f.getPreviousSibling();if(ce(v)&&!Vr(v)||(v=Ot(),v.setFormat(i),p.canInsertTextBefore()?f.insertBefore(v):p.insertBefore(v)),v.select(),f=v,t!=="")return void this.insertText(t)}else if(f.isSegmented()&&l!==g){const v=Ot(f.getTextContent());v.setFormat(i),f.replace(v),f=v}else if(!this.isCollapsed()&&t!==""){const v=m.getParent();if(!p.canInsertTextBefore()||!p.canInsertTextAfter()||Q(v)&&(!v.canInsertTextBefore()||!v.canInsertTextAfter()))return this.insertText(""),yx(this.anchor,this.focus),void this.insertText(t)}if(d===1){if(ta(f)){const b=Ot(t);return b.select(),void f.replace(b)}const v=f.getFormat(),x=f.getStyle();if(l!==u||v===i&&x===a){if(wu(f)){const b=Ot(t);return b.setFormat(i),b.setStyle(a),b.select(),void f.replace(b)}}else{if(f.getTextContent()!==""){const b=Ot(t);if(b.setFormat(i),b.setStyle(a),b.select(),l===0)f.insertBefore(b,!1);else{const[k]=f.splitText(l);k.insertAfter(b,!1)}return void(b.isComposing()&&this.anchor.type==="text"&&(this.anchor.offset-=t.length))}f.setFormat(i),f.setStyle(a)}const y=u-l;f=f.spliceText(l,y,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=v,this.style=x,f.isComposing()&&(this.anchor.offset-=t.length))}else{const v=new Set([...f.getParentKeys(),...m.getParentKeys()]),x=Q(f)?f:f.getParentOrThrow();let y=Q(m)?m:m.getParentOrThrow(),b=m;if(!x.is(y)&&y.isInline())do b=y,y=y.getParentOrThrow();while(y.isInline());if(o.type==="text"&&(u!==0||m.getTextContent()==="")||o.type==="element"&&m.getIndexWithinParent()<u)if(ce(m)&&!ta(m)&&u!==m.getTextContentSize()){if(m.isSegmented()){const E=Ot(m.getTextContent());m.replace(E),m=E}wt(o.getNode())||o.type!=="text"||(m=m.spliceText(0,u,"")),v.add(m.__key)}else{const E=m.getParentOrThrow();E.canBeEmpty()||E.getChildrenSize()!==1?m.remove():E.remove()}else v.add(m.__key);const k=y.getChildren(),w=new Set(c),S=x.is(y),N=x.isInline()&&f.getNextSibling()===null?x:f;for(let E=k.length-1;E>=0;E--){const T=k[E];if(T.is(f)||Q(T)&&T.isParentOf(f))break;T.isAttached()&&(!w.has(T)||T.is(b)?S||N.insertAfter(T,!1):T.remove())}if(!S){let E=y,T=null;for(;E!==null;){const C=E.getChildren(),O=C.length;(O===0||C[O-1].is(T))&&(v.delete(E.__key),T=E),E=E.getParent()}}if(ta(f))if(l===g)f.select();else{const E=Ot(t);E.select(),f.replace(E)}else f=f.spliceText(l,g-l,t,!0),f.getTextContent()===""?f.remove():this.anchor.type==="text"&&(this.format=f.getFormat(),this.style=f.getStyle(),f.isComposing()&&(this.anchor.offset-=t.length));for(let E=1;E<d;E++){const T=c[E],C=T.__key;v.has(C)||T.remove()}}}removeText(){const t=de()===this;Fu(this,s$(yb(this))),t&&de()!==this&&Yt(this)}formatText(t,n=null){if(this.isCollapsed())return this.toggleFormat(t),void zt(null);const r=this.getNodes(),i=[];for(const k of r)ce(k)&&i.push(k);const a=k=>{r.forEach(w=>{if(Q(w)){const S=w.getFormatFlags(t,k);w.setTextFormat(S)}})},s=i.length;if(s===0)return this.toggleFormat(t),zt(null),void a(n);const o=this.anchor,l=this.focus,u=this.isBackward(),c=u?l:o,d=u?o:l;let f=0,g=i[0],p=c.type==="element"?0:c.offset;if(c.type==="text"&&p===g.getTextContentSize()&&(f=1,g=i[1],p=0),g==null)return;const m=g.getFormatFlags(t,n);a(m);const v=s-1;let x=i[v];const y=d.type==="text"?d.offset:x.getTextContentSize();if(g.is(x)){if(p===y)return;if(Vr(g)||p===0&&y===g.getTextContentSize())g.setFormat(m);else{const k=g.splitText(p,y),w=p===0?k[0]:k[1];w.setFormat(m),c.type==="text"&&c.set(w.__key,0,"text"),d.type==="text"&&d.set(w.__key,y-p,"text")}return void(this.format=m)}p===0||Vr(g)||([,g]=g.splitText(p),p=0),g.setFormat(m);const b=x.getFormatFlags(t,m);y>0&&(y===x.getTextContentSize()||Vr(x)||([x]=x.splitText(y)),x.setFormat(b));for(let k=f+1;k<v;k++){const w=i[k],S=w.getFormatFlags(t,b);w.setFormat(S)}c.type==="text"&&c.set(g.__key,p,"text"),d.type==="text"&&d.set(x.__key,y,"text"),this.format=m|b}insertNodes(t){if(t.length===0)return;if(this.isCollapsed()||this.removeText(),this.anchor.key==="root"){this.insertParagraph();const p=de();return ie(p)||ae(134),p.insertNodes(t)}const n=(this.isBackward()?this.focus:this.anchor).getNode(),r=Rt(n,$n),i=t[t.length-1];if(Q(r)&&"__language"in r){if("__language"in t[0])this.insertText(t[0].getTextContent());else{const p=Bf(this);r.splice(p,0,t),i.selectEnd()}return}if(!t.some(p=>(Q(p)||Re(p))&&!p.isInline())){Q(r)||ae(211,n.constructor.name,n.getType());const p=Bf(this);return r.splice(p,0,t),void i.selectEnd()}const a=function(p){const m=tt();let v=null;for(let x=0;x<p.length;x++){const y=p[x],b=qa(y);if(b||Re(y)&&y.isInline()||Q(y)&&y.isInline()||ce(y)||y.isParentRequired()){if(v===null&&(v=y.createParentElementNode(),m.append(v),b))continue;v!==null&&v.append(y)}else m.append(y),v=null}return m}(t),s=a.getLastDescendant(),o=a.getChildren(),l=!Q(r)||!r.isEmpty()?this.insertParagraph():null,u=o[o.length-1];let c=o[0];var d;Q(d=c)&&$n(d)&&!d.isEmpty()&&Q(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(Q(r)||ae(211,n.constructor.name,n.getType()),r.append(...c.getChildren()),c=o[1]),c&&(r===null&&ae(212,n.constructor.name,n.getType()),function(p,m){const v=m.getParentOrThrow().getLastChild();let x=m;const y=[m];for(;x!==v;)x.getNextSibling()||ae(140),x=x.getNextSibling(),y.push(x);let b=p;for(const k of y)b=b.insertAfter(k)}(r,c));const f=Rt(s,$n);l&&Q(f)&&(l.canMergeWhenEmpty()||$n(u))&&(f.append(...l.getChildren()),l.remove()),Q(r)&&r.isEmpty()&&r.remove(),s.selectEnd();const g=Q(r)?r.getLastChild():null;qa(g)&&f!==r&&g.remove()}insertParagraph(){if(this.anchor.key==="root"){const s=tt();return lt().splice(this.anchor.offset,0,[s]),s.select(),s}const t=Bf(this),n=Rt(this.anchor.getNode(),$n);Q(n)||ae(213);const r=n.getChildAtIndex(t),i=r?[r,...r.getNextSiblings()]:[],a=n.insertNewAfter(this,!1);return a?(a.append(...i),a.selectStart(),a):null}insertLineBreak(t){const n=Wr();if(this.insertNodes([n]),t){const r=n.getParentOrThrow(),i=n.getIndexWithinParent();r.select(i,i)}}extract(){const t=[...this.getNodes()],n=t.length;let r=t[0],i=t[n-1];const[a,s]=If(this),o=this.isBackward(),[l,u]=o?[this.focus,this.anchor]:[this.anchor,this.focus],[c,d]=o?[s,a]:[a,s];if(n===0)return[];if(n===1){if(ce(r)&&!this.isCollapsed()){const f=r.splitText(c,d),g=c===0?f[0]:f[1];return g?(l.set(g.getKey(),0,"text"),u.set(g.getKey(),g.getTextContentSize(),"text"),[g]):[]}return[r]}if(ce(r)&&(c===r.getTextContentSize()?t.shift():c!==0&&([,r]=r.splitText(c),t[0]=r,l.set(r.getKey(),0,"text"))),ce(i)){const f=i.getTextContent().length;d===0?t.pop():d!==f&&([i]=i.splitText(d),t[t.length-1]=i,u.set(i.getKey(),i.getTextContentSize(),"text"))}return t}modify(t,n,r){if(Ex(this,t,n,r))return;const i=t==="move",a=et(),s=On(kn(a));if(!s)return;const o=a._blockCursorElement,l=a._rootElement,u=this.focus.getNode();if(l===null||o===null||!Q(u)||u.isInline()||u.canBeEmpty()||lh(o,a,l),this.dirty){let c=ts(a,this.anchor.key),d=ts(a,this.focus.key);this.anchor.type==="text"&&(c=Ja(c)),this.focus.type==="text"&&(d=Ja(d)),c&&d&&Sx(s,c,this.anchor.offset,d,this.focus.offset)}if(function(c,d,f,g){c.modify(d,f,g)}(s,t,n?"backward":"forward",r),s.rangeCount>0){const c=s.getRangeAt(0),d=this.anchor.getNode(),f=wt(d)?d:HO(d);if(this.applyDOMRange(c),this.dirty=!0,!i){const g=this.getNodes(),p=[];let m=!1;for(let v=0;v<g.length;v++){const x=g[v];ih(x,f)?p.push(x):m=!0}if(m&&p.length>0)if(n){const v=p[0];Q(v)?v.selectStart():v.getParentOrThrow().selectStart()}else{const v=p[p.length-1];Q(v)?v.selectEnd():v.getParentOrThrow().selectEnd()}s.anchorNode===c.startContainer&&s.anchorOffset===c.startOffset||function(v){const x=v.focus,y=v.anchor,b=y.key,k=y.offset,w=y.type;y.set(x.key,x.offset,x.type,!0),x.set(b,k,w,!0)}(this)}}r==="lineboundary"&&Ex(this,t,n,r,"decorators")}forwardDeletion(t,n,r){if(!r&&(t.type==="element"&&Q(n)&&t.offset===n.getChildrenSize()||t.type==="text"&&t.offset===n.getTextContentSize())){const i=n.getParent(),a=n.getNextSibling()||(i===null?null:i.getNextSibling());if(Q(a)&&a.isShadowRoot())return!0}return!1}deleteCharacter(t){const n=this.isCollapsed();if(this.isCollapsed()){const r=this.anchor;let i=r.getNode();if(this.forwardDeletion(r,i,t))return;const a=mh(wr(r,t?"previous":"next"));if(a.getTextSlices().every(o=>o===null||o.distance===0)){let o={type:"initial"};for(const l of a.iterNodeCarets("shadowRoot"))if(nr(l)){if(!l.origin.isInline()){if(l.origin.isShadowRoot()){if(o.type==="merge-block")break;if(Q(a.anchor.origin)&&a.anchor.origin.isEmpty()){const u=Sn(l);Fu(this,fi(u,u)),a.anchor.origin.remove()}return}o.type!=="merge-next-block"&&o.type!=="merge-block"||(o={block:o.block,caret:l,type:"merge-block"})}}else{if(o.type==="merge-block")break;if(rs(l)){if(Q(l.origin)){if(l.origin.isInline()){if(!l.origin.isParentOf(a.anchor.origin))break}else o={block:l.origin,type:"merge-next-block"};continue}if(Re(l.origin)){if(!l.origin.isIsolated())if(o.type==="merge-next-block"&&(l.origin.isKeyboardSelectable()||!l.origin.isInline())&&Q(a.anchor.origin)&&a.anchor.origin.isEmpty()){a.anchor.origin.remove();const u=_x();u.add(l.origin.getKey()),Yt(u)}else l.origin.remove();return}break}}if(o.type==="merge-block"){const{caret:l,block:u}=o;return Fu(this,fi(!l.origin.isEmpty()&&u.isEmpty()?is(St(u,l.direction)):a.anchor,l)),this.removeText()}}const s=this.focus;if(this.modify("extend",t,"character"),this.isCollapsed()){if(t&&r.offset===0&&px(this,r.getNode()))return}else{const o=s.type==="text"?s.getNode():null;if(i=r.type==="text"?r.getNode():null,o!==null&&o.isSegmented()){const l=s.offset,u=o.getTextContentSize();if(o.is(i)||t&&l!==u||!t&&l!==0)return void gx(o,t,l)}else if(i!==null&&i.isSegmented()){const l=r.offset,u=i.getTextContentSize();if(i.is(o)||t&&l!==0||!t&&l!==u)return void gx(i,t,l)}(function(l,u){const c=l.anchor,d=l.focus,f=c.getNode(),g=d.getNode();if(f===g&&c.type==="text"&&d.type==="text"){const p=c.offset,m=d.offset,v=p<m,x=v?p:m,y=v?m:p,b=y-1;x!==b&&function(k){return!(Zx(k)||MO(k))}(f.getTextContent().slice(x,y))&&(u?d.set(d.key,b,d.type):c.set(c.key,b,c.type))}})(this,t)}}if(this.removeText(),t&&!n&&this.isCollapsed()&&this.anchor.type==="element"&&this.anchor.offset===0){const r=this.anchor.getNode();r.isEmpty()&&wt(r.getParent())&&r.getPreviousSibling()===null&&px(this,r)}}deleteLine(t){this.isCollapsed()&&this.modify("extend",t,"lineboundary"),this.isCollapsed()?this.deleteCharacter(t):this.removeText()}deleteWord(t){if(this.isCollapsed()){const n=this.anchor,r=n.getNode();if(this.forwardDeletion(n,r,t))return;this.modify("extend",t,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function Kt(e){return e instanceof ku}function hx(e){const t=e.offset;if(e.type==="text")return t;const n=e.getNode();return t===n.getChildrenSize()?n.getTextContent().length:0}function If(e){const t=e.getStartEndPoints();if(t===null)return[0,0];const[n,r]=t;return n.type==="element"&&r.type==="element"&&n.key===r.key&&n.offset===r.offset?[0,0]:[hx(n),hx(r)]}function px(e,t){for(let n=t;n;n=n.getParent()){if(Q(n)){if(n.collapseAtStart(e))return!0;if(fn(n))break}if(n.getPreviousSibling())break}return!1}const MO=(()=>{try{const e=new RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch{}return()=>!1})();function gx(e,t,n){const r=e,i=r.getTextContent().split(/(?=\s)/g),a=i.length;let s=0,o=0;for(let u=0;u<a;u++){const c=u===a-1;if(o=s,s+=i[u].length,t&&s===n||s>n||c){i.splice(u,1),c&&(o=void 0);break}}const l=i.join("").trim();l===""?r.remove():(r.setTextContent(l),r.select(o,o))}function mx(e,t,n,r){let i,a=t;if(yt(e)){let s=!1;const o=e.childNodes,l=o.length,u=r._blockCursorElement;a===l&&(s=!0,a=l-1);let c=o[a],d=!1;if(c===u)c=o[a+1],d=!0;else if(u!==null){const f=u.parentNode;e===f&&t>Array.prototype.indexOf.call(f.children,u)&&a--}if(i=Qa(c),ce(i))a=_r(i,s?"next":"previous");else{let f=Qa(e);if(f===null)return null;if(Q(f)){const g=r.getElementByKey(f.getKey());g===null&&ae(214),[f,a]=f.getDOMSlot(g).resolveChildIndex(f,g,e,t),Q(f)||ae(215),s&&a>=f.getChildrenSize()&&(a=Math.max(0,f.getChildrenSize()-1));let m=f.getChildAtIndex(a);if(Q(m)&&function(v,x,y){const b=v.getParent();return y===null||b===null||!b.canBeEmpty()||b!==y.getNode()}(m,0,n)){const v=s?m.getLastDescendant():m.getFirstDescendant();v===null?f=m:(m=v,f=Q(m)?m:m.getParentOrThrow()),a=0}ce(m)?(i=m,f=null,a=_r(m,s?"next":"previous")):m!==f&&s&&!d&&(Q(f)||ae(216),a=Math.min(f.getChildrenSize(),a+1))}else{const g=f.getIndexWithinParent();a=t===0&&Re(f)&&Qa(e)===f?g:g+1,f=f.getParentOrThrow()}if(Q(f))return vr(f.__key,a,"element")}}else i=Qa(e);return ce(i)?vr(i.__key,_r(i,a,"clamp"),"text"):null}function vx(e,t,n){const r=e.offset,i=e.getNode();if(r===0){const a=i.getPreviousSibling(),s=i.getParent();if(t){if((n||!t)&&a===null&&Q(s)&&s.isInline()){const o=s.getPreviousSibling();ce(o)&&e.set(o.__key,o.getTextContent().length,"text")}}else Q(a)&&!n&&a.isInline()?e.set(a.__key,a.getChildrenSize(),"element"):ce(a)&&e.set(a.__key,a.getTextContent().length,"text")}else if(r===i.getTextContent().length){const a=i.getNextSibling(),s=i.getParent();if(t&&Q(a)&&a.isInline())e.set(a.__key,0,"element");else if((n||t)&&a===null&&Q(s)&&s.isInline()&&!s.canInsertTextAfter()){const o=s.getNextSibling();ce(o)&&e.set(o.__key,0,"text")}}}function yx(e,t,n){if(e.type==="text"&&t.type==="text"){const r=e.isBefore(t),i=e.is(t);vx(e,r,i),vx(t,!r,i),i&&t.set(e.key,e.offset,e.type)}}function xx(e,t,n,r,i,a){if(e===null||n===null||!go(i,e,n))return null;const s=mx(e,t,ie(a)?a.anchor:null,i);if(s===null)return null;const o=mx(n,r,ie(a)?a.focus:null,i);if(o===null)return null;if(s.type==="element"&&o.type==="element"){const l=Qa(e),u=Qa(n);if(Re(l)&&Re(u))return null}return yx(s,o),[s,o]}function Ff(e){return Q(e)&&!e.isInline()}function bx(e,t,n,r,i,a){const s=ci(),o=new Qi(vr(e,t,i),vr(n,r,a),0,"");return o.dirty=!0,s._selection=o,o}function zf(){const e=vr("root",0,"element"),t=vr("root",0,"element");return new Qi(e,t,0,"")}function _x(){return new ku(new Set)}function Rf(e,t,n,r){const i=n._window;if(i===null)return null;const a=r||i.event,s=a?a.type:void 0,o=s==="selectionchange",l=!ff&&(o||s==="beforeinput"||s==="compositionstart"||s==="compositionend"||s==="click"&&a&&a.detail===3||s==="drop"||s===void 0);let u,c,d,f;if(ie(e)&&!l)return e.clone();if(t===null)return null;if(u=t.anchorNode,c=t.focusNode,d=t.anchorOffset,f=t.focusOffset,(o||s===void 0)&&ie(e)&&!go(n,u,c))return e.clone();const g=xx(u,d,c,f,n,e);if(g===null)return null;const[p,m]=g;let v=0,x="";if(ie(e)){const y=e.anchor;if(p.key===y.key)v=e.format,x=e.style;else{const b=p.getNode();ce(b)?(v=b.getFormat(),x=b.getStyle()):Q(b)&&(v=b.getTextFormat(),x=b.getTextStyle())}}return new Qi(p,m,v,x)}function de(){return ci()._selection}function Ya(){return et()._editorState._selection}function Su(e,t,n,r=1){const i=e.anchor,a=e.focus,s=i.getNode(),o=a.getNode();if(!t.is(s)&&!t.is(o))return;const l=t.__key;if(e.isCollapsed()){const u=i.offset;if(n<=u&&r>0||n<u&&r<0){const c=Math.max(0,u+r);i.set(l,c,"element"),a.set(l,c,"element"),wx(e)}}else{const u=e.isBackward(),c=u?a:i,d=c.getNode(),f=u?i:a,g=f.getNode();if(t.is(d)){const p=c.offset;(n<=p&&r>0||n<p&&r<0)&&c.set(l,Math.max(0,p+r),"element")}if(t.is(g)){const p=f.offset;(n<=p&&r>0||n<p&&r<0)&&f.set(l,Math.max(0,p+r),"element")}}wx(e)}function wx(e){const t=e.anchor,n=t.offset,r=e.focus,i=r.offset,a=t.getNode(),s=r.getNode();if(e.isCollapsed()){if(!Q(a))return;const o=a.getChildrenSize(),l=n>=o,u=l?a.getChildAtIndex(o-1):a.getChildAtIndex(n);if(ce(u)){let c=0;l&&(c=u.getTextContentSize()),t.set(u.__key,c,"text"),r.set(u.__key,c,"text")}return}if(Q(a)){const o=a.getChildrenSize(),l=n>=o,u=l?a.getChildAtIndex(o-1):a.getChildAtIndex(n);if(ce(u)){let c=0;l&&(c=u.getTextContentSize()),t.set(u.__key,c,"text")}}if(Q(s)){const o=s.getChildrenSize(),l=i>=o,u=l?s.getChildAtIndex(o-1):s.getChildAtIndex(i);if(ce(u)){let c=0;l&&(c=u.getTextContentSize()),r.set(u.__key,c,"text")}}}function Nu(e,t,n,r,i){let a=null,s=0,o=null;r!==null?(a=r.__key,ce(r)?(s=r.getTextContentSize(),o="text"):Q(r)&&(s=r.getChildrenSize(),o="element")):i!==null&&(a=i.__key,ce(i)?o="text":Q(i)&&(o="element")),a!==null&&o!==null?e.set(a,s,o):(s=t.getIndexWithinParent(),s===-1&&(s=n.getChildrenSize()),e.set(n.__key,s,"element"))}function kx(e,t,n,r,i){e.type==="text"?e.set(n,e.offset+(t?0:i),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function Sx(e,t,n,r,i){try{e.setBaseAndExtent(t,n,r,i)}catch{}}function Nx(e,t,n){const r=ts(e,t.getKey());if(Q(t)){const i=t.getDOMSlot(r);return[i.element,n+i.getFirstChildOffset()]}return[r,n]}function jO(e,t,n,r,i,a,s){const o=r.anchorNode,l=r.focusNode,u=r.anchorOffset,c=r.focusOffset,d=document.activeElement;if(i.has(xO)&&d!==a||d!==null&&Xf(d))return;if(!ie(t))return void(e!==null&&go(n,o,l)&&r.removeAllRanges());const f=t.anchor,g=t.focus,p=f.getNode(),m=g.getNode(),[v,x]=Nx(n,p,f.offset),[y,b]=Nx(n,m,g.offset),k=t.format,w=t.style,S=t.isCollapsed();let N=v,E=y,T=!1;var C,O,$,M,j;if(f.type==="text"?(N=Ja(v),T=p.getFormat()!==k||p.getStyle()!==w):ie(e)&&e.anchor.type==="text"&&(T=!0),g.type==="text"&&(E=Ja(y)),N!==null&&E!==null&&(S&&(e===null||T||ie(e)&&(e.format!==k||e.style!==w))&&(C=k,O=w,$=x,M=f.key,j=performance.now(),K0=[C,O,$,M,j]),u!==x||c!==b||o!==N||l!==E||r.type==="Range"&&S||(d!==null&&a.contains(d)||i.has(ix)||a.focus({preventScroll:!0}),f.type==="element"))){if(Sx(r,N,x,E,b),!ui||!t.isCollapsed()||a===null||i.has(ix)||document.activeElement!==null&&a.contains(document.activeElement)||a.focus({preventScroll:!0}),!i.has(bO)&&t.isCollapsed()&&a!==null&&a===document.activeElement){const P=ie(t)&&t.anchor.type==="element"?N.childNodes[x]||null:r.rangeCount>0?r.getRangeAt(0):null;if(P!==null){let F;if(P instanceof Text){const B=document.createRange();B.selectNode(P),F=B.getBoundingClientRect()}else F=P.getBoundingClientRect();(function(B,W,q){const D=ob(q),A=ah(D);if(D===null||A===null)return;let{top:U,bottom:Y}=W,G=0,J=0,R=q;for(;R!==null;){const K=R===D.body;if(K)G=0,J=kn(B).innerHeight;else{const z=R.getBoundingClientRect();G=z.top,J=z.bottom}let Z=0;if(U<G?Z=-(G-U):Y>J&&(Z=Y-J),Z!==0)if(K)A.scrollBy(0,Z);else{const z=R.scrollTop;R.scrollTop+=Z;const X=R.scrollTop-z;U-=X,Y-=X}if(K)break;R=mo(R)}})(n,F,a)}}Mf=!0}}function OO(e){let t=de()||Ya();t===null&&(t=lt().selectEnd()),t.insertNodes(e)}function Bf(e){let t=e;e.isCollapsed()||t.removeText();const n=de();ie(n)&&(t=n),ie(t)||ae(161);const r=t.anchor;let i=r.getNode(),a=r.offset;for(;!$n(i);){const s=i;if([i,a]=$O(i,a),s.is(i))break}return a}function $O(e,t){const n=e.getParent();if(!n){const i=tt();return lt().append(i),i.select(),[lt(),0]}if(ce(e)){const i=e.splitText(t);if(i.length===0)return[n,e.getIndexWithinParent()];const a=t===0?0:1;return[n,i[0].getIndexWithinParent()+a]}if(!Q(e)||t===0)return[n,e.getIndexWithinParent()];const r=e.getChildAtIndex(t);if(r){const i=new Qi(vr(e.__key,t,"element"),vr(e.__key,t,"element"),0,""),a=e.insertNewAfter(i);a&&a.append(r,...r.getNextSiblings())}return[n,e.getIndexWithinParent()+1]}function Ex(e,t,n,r,i="decorators-and-blocks"){if(t==="move"&&r==="character"&&!e.isCollapsed()){const[c,d]=n===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return d.set(c.key,c.offset,c.type),!0}const a=wr(e.focus,n?"previous":"next"),s=r==="lineboundary",o=t==="move";let l=a,u=i==="decorators-and-blocks";if(!bb(l)){for(const c of l){u=!1;const{origin:d}=c;if(!Re(d)||d.isIsolated()||(l=c,!s||!d.isInline()))break}if(u)for(const c of mh(a).iterNodeCarets(t==="extend"?"shadowRoot":"root")){if(nr(c))c.origin.isInline()||(l=c);else{if(Q(c.origin))continue;Re(c.origin)&&!c.origin.isInline()&&(l=c)}break}}if(l===a)return!1;if(o&&!s&&Re(l.origin)&&l.origin.isKeyboardSelectable()){const c=_x();return c.add(l.origin.getKey()),Yt(c),!0}return l=Sn(l),o&&hi(e.anchor,l),hi(e.focus,l),u||!s}let $t=null,Pt=null,dn=!1,Wf=!1,Eu=0;const Tx={characterData:!0,childList:!0,subtree:!0};function co(){return dn||$t!==null&&$t._readOnly}function Ft(){dn&&ae(13)}function Cx(){Eu>99&&ae(14)}function ci(){return $t===null&&ae(195,Mx()),$t}function et(){return Pt===null&&ae(196,Mx()),Pt}function Mx(){let e=0;const t=new Set,n=ea.version;if(typeof window<"u")for(const i of document.querySelectorAll("[contenteditable]")){const a=Cu(i);if(Jf(a))e++;else if(a){let s=String(a.constructor.version||"<0.17.1");s===n&&(s+=" (separately built, likely a bundler configuration issue)"),t.add(s)}}let r=` Detected on the page: ${e} compatible editor(s) with version ${n}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function PO(){return Pt}function jx(e,t,n){const r=t.__type,i=Wx(e,r);let a=n.get(r);a===void 0&&(a=Array.from(i.transforms),n.set(r,a));const s=a.length;for(let o=0;o<s&&(a[o](t),t.isAttached());o++);}function Ox(e,t){return e!==void 0&&e.__key!==t&&e.isAttached()}function $x(e,t){if(!t)return;const n=e._updateTags;let r=t;Array.isArray(t)||(r=[t]);for(const i of r)n.add(i)}function AO(e){return Uf(e,et()._nodes)}function Uf(e,t){const n=e.type,r=t.get(n);r===void 0&&ae(17,n);const i=r.klass;e.type!==i.getType()&&ae(18,i.name);const a=i.importJSON(e),s=e.children;if(Q(a)&&Array.isArray(s))for(let o=0;o<s.length;o++){const l=Uf(s[o],t);a.append(l)}return a}function Px(e,t,n){const r=$t,i=dn,a=Pt;$t=t,dn=!0,Pt=e;try{return n()}finally{$t=r,dn=i,Pt=a}}function qr(e,t){const n=e._pendingEditorState,r=e._rootElement,i=e._headless||r===null;if(n===null)return;const a=e._editorState,s=a._selection,o=n._selection,l=e._dirtyType!==0,u=$t,c=dn,d=Pt,f=e._updating,g=e._observer;let p=null;if(e._pendingEditorState=null,e._editorState=n,!i&&l&&g!==null){Pt=e,$t=n,dn=!1,e._updating=!0;try{const S=e._dirtyType,N=e._dirtyElements,E=e._dirtyLeaves;g.disconnect(),p=Qj(a,n,e,S,N,E)}catch(S){if(S instanceof Error&&e._onError(S),Wf)throw S;return Rx(e,null,r,n),c0(e),e._dirtyType=2,Wf=!0,qr(e,a),void(Wf=!1)}finally{g.observe(r,Tx),e._updating=f,$t=u,dn=c,Pt=d}}n._readOnly||(n._readOnly=!0);const m=e._dirtyLeaves,v=e._dirtyElements,x=e._normalizedNodes,y=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(S,N){const E=S._decorators;let T=S._pendingDecorators||E;const C=N._nodeMap;let O;for(O in T)C.has(O)||(T===E&&(T=Gx(S)),delete T[O])}(e,n);const k=i?null:On(kn(e));if(e._editable&&k!==null&&(l||o===null||o.dirty||!o.is(s))&&r!==null&&!y.has(_O)){Pt=e,$t=n;try{if(g!==null&&g.disconnect(),l||o===null||o.dirty){const S=e._blockCursorElement;S!==null&&lh(S,e,r),jO(s,o,e,k,y,r)}(function(S,N,E){let T=S._blockCursorElement;if(ie(E)&&E.isCollapsed()&&E.anchor.type==="element"&&N.contains(document.activeElement)){const C=E.anchor,O=C.getNode(),$=C.offset;let M=!1,j=null;if($===O.getChildrenSize())oh(O.getChildAtIndex($-1))&&(M=!0);else{const P=O.getChildAtIndex($);if(P!==null&&oh(P)){const F=P.getPreviousSibling();(F===null||oh(F))&&(M=!0,j=S.getElementByKey(P.__key))}}if(M){const P=S.getElementByKey(O.__key);return T===null&&(S._blockCursorElement=T=function(F){const B=F.theme,W=document.createElement("div");W.contentEditable="false",W.setAttribute("data-lexical-cursor","true");let q=B.blockCursor;if(q!==void 0){if(typeof q=="string"){const D=pi(q);q=B.blockCursor=D}q!==void 0&&W.classList.add(...q)}return W}(S._config)),N.style.caretColor="transparent",void(j===null?P.appendChild(T):P.insertBefore(T,j))}}T!==null&&lh(T,S,N)})(e,r,o)}finally{g!==null&&g.observe(r,Tx),Pt=d,$t=u}}p!==null&&function(S,N,E,T,C){const O=Array.from(S._listeners.mutation),$=O.length;for(let M=0;M<$;M++){const[j,P]=O[M];for(const F of P){const B=N.get(F);B!==void 0&&j(B,{dirtyLeaves:T,prevEditorState:C,updateTags:E})}}}(e,p,y,m,a),ie(o)||o===null||s!==null&&s.is(o)||e.dispatchCommand(kf,void 0);const w=e._pendingDecorators;w!==null&&(e._decorators=w,e._pendingDecorators=null,fo("decorator",e,!0,w)),function(S,N,E){const T=Xx(N),C=Xx(E);T!==C&&fo("textcontent",S,!0,C)}(e,t||a,n),fo("update",e,!0,{dirtyElements:v,dirtyLeaves:m,editorState:n,mutatedNodes:p,normalizedNodes:x,prevEditorState:t||a,tags:y}),function(S,N){if(S._deferred=[],N.length!==0){const E=S._updating;S._updating=!0;try{for(let T=0;T<N.length;T++)N[T]()}finally{S._updating=E}}}(e,b),function(S){const N=S._updates;if(N.length!==0){const E=N.shift();if(E){const[T,C]=E;Tu(S,T,C)}}}(e)}function fo(e,t,n,...r){const i=t._updating;t._updating=n;try{const a=Array.from(t._listeners[e]);for(let s=0;s<a.length;s++)a[s].apply(null,r)}finally{t._updating=i}}function Ax(e,t){const n=e._updates;let r=t||!1;for(;n.length!==0;){const i=n.shift();if(i){const[a,s]=i,o=e._pendingEditorState;let l;s!==void 0&&(l=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(o===null&&ae(191),o._flushSync=!0),l&&e._deferred.push(l),$x(e,s.tag)),o==null?Tu(e,a,s):a()}}return r}function Tu(e,t,n){const r=e._updateTags;let i,a=!1,s=!1;n!==void 0&&(i=n.onUpdate,$x(e,n.tag),a=n.skipTransforms||!1,s=n.discrete||!1),i&&e._deferred.push(i);const o=e._editorState;let l=e._pendingEditorState,u=!1;(l===null||l._readOnly)&&(l=e._pendingEditorState=Fx(l||o),u=!0),l._flushSync=s;const c=$t,d=dn,f=Pt,g=e._updating;$t=l,dn=!1,e._updating=!0,Pt=e;const p=e._headless||e.getRootElement()===null;Yf(null);try{u&&(p?o._selection!==null&&(l._selection=o._selection.clone()):l._selection=function(y,b){const k=y.getEditorState()._selection,w=On(kn(y));return ie(k)||k==null?Rf(k,w,y,b):k.clone()}(e,n&&n.event||null));const v=e._compositionKey;t(),a=Ax(e,a),function(y,b){const k=b.getEditorState()._selection,w=y._selection;if(ie(w)){const S=w.anchor,N=w.focus;let E;if(S.type==="text"&&(E=S.getNode(),E.selectionTransform(k,w)),N.type==="text"){const T=N.getNode();E!==T&&T.selectionTransform(k,w)}}}(l,e),e._dirtyType!==0&&(a?function(y,b){const k=b._dirtyLeaves,w=y._nodeMap;for(const S of k){const N=w.get(S);ce(N)&&N.isAttached()&&N.isSimpleText()&&!N.isUnmergeable()&&y0(N)}}(l,e):function(y,b){const k=b._dirtyLeaves,w=b._dirtyElements,S=y._nodeMap,N=di(),E=new Map;let T=k,C=T.size,O=w,$=O.size;for(;C>0||$>0;){if(C>0){b._dirtyLeaves=new Set;for(const M of T){const j=S.get(M);ce(j)&&j.isAttached()&&j.isSimpleText()&&!j.isUnmergeable()&&y0(j),j!==void 0&&Ox(j,N)&&jx(b,j,E),k.add(M)}if(T=b._dirtyLeaves,C=T.size,C>0){Eu++;continue}}b._dirtyLeaves=new Set,b._dirtyElements=new Map,O.delete("root")&&O.set("root",!0);for(const M of O){const j=M[0],P=M[1];if(w.set(j,P),!P)continue;const F=S.get(j);F!==void 0&&Ox(F,N)&&jx(b,F,E)}T=b._dirtyLeaves,C=T.size,O=b._dirtyElements,$=O.size,Eu++}b._dirtyLeaves=k,b._dirtyElements=w}(l,e),Ax(e),function(y,b,k,w){const S=y._nodeMap,N=b._nodeMap,E=[];for(const[T]of w){const C=N.get(T);C!==void 0&&(C.isAttached()||(Q(C)&&o0(C,T,S,N,E,w),S.has(T)||w.delete(T),E.push(T)))}for(const T of E)N.delete(T);for(const T of k){const C=N.get(T);C===void 0||C.isAttached()||(S.has(T)||k.delete(T),N.delete(T))}}(o,l,e._dirtyLeaves,e._dirtyElements)),v!==e._compositionKey&&(l._flushSync=!0);const x=l._selection;if(ie(x)){const y=l._nodeMap,b=x.anchor.key,k=x.focus.key;y.get(b)!==void 0&&y.get(k)!==void 0||ae(19)}else Kt(x)&&x._nodes.size===0&&(l._selection=null)}catch(v){return v instanceof Error&&e._onError(v),e._pendingEditorState=o,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void qr(e)}finally{$t=c,dn=d,Pt=f,e._updating=g,Eu=0}e._dirtyType!==0||e._deferred.length>0||function(v,x){const y=x.getEditorState()._selection,b=v._selection;if(b!==null){if(b.dirty||!b.is(y))return!0}else if(y!==null)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,qr(e)):u&&RO(()=>{qr(e)}):(l._flushSync=!1,u&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function yr(e,t,n){Pt===e&&n===void 0?t():Tu(e,t,n)}class ho{constructor(t,n,r){ee(this,"element");ee(this,"before");ee(this,"after");this.element=t,this.before=n||null,this.after=r||null}withBefore(t){return new ho(this.element,t,this.after)}withAfter(t){return new ho(this.element,this.before,t)}withElement(t){return this.element===t?this:new ho(t,this.before,this.after)}insertChild(t){const n=this.before||this.getManagedLineBreak();return n!==null&&n.parentElement!==this.element&&ae(222),this.element.insertBefore(t,n),this}removeChild(t){return t.parentElement!==this.element&&ae(223),this.element.removeChild(t),this}replaceChild(t,n){return n.parentElement!==this.element&&ae(224),this.element.replaceChild(t,n),this}getFirstChild(){const t=this.after?this.after.nextSibling:this.element.firstChild;return t===this.before||t===this.getManagedLineBreak()?null:t}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(t){if(t===null)this.removeManagedLineBreak();else{const n=t==="decorator"&&(tu||Zs||eu);this.insertManagedLineBreak(n)}}removeManagedLineBreak(){const t=this.getManagedLineBreak();if(t){const n=this.element,r=t.nodeName==="IMG"?t.nextSibling:null;r&&n.removeChild(r),n.removeChild(t),n.__lexicalLineBreak=void 0}}insertManagedLineBreak(t){const n=this.getManagedLineBreak();if(n){if(t===(n.nodeName==="IMG"))return;this.removeManagedLineBreak()}const r=this.element,i=this.before,a=document.createElement("br");if(r.insertBefore(a,i),t){const s=document.createElement("img");s.setAttribute("data-lexical-linebreak","true"),s.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",s.alt="",r.insertBefore(s,a),r.__lexicalLineBreak=s}else r.__lexicalLineBreak=a}getFirstChildOffset(){let t=0;for(let n=this.after;n!==null;n=n.previousSibling)t++;return t}resolveChildIndex(t,n,r,i){if(r===this.element){const l=this.getFirstChildOffset();return[t,Math.min(l+t.getChildrenSize(),Math.max(l,i))]}const a=Lx(n,r);a.push(i);const s=Lx(n,this.element);let o=t.getIndexWithinParent();for(let l=0;l<s.length;l++){const u=a[l],c=s[l];if(u===void 0||u<c)break;if(u>c){o+=1;break}}return[t.getParentOrThrow(),o]}}function Lx(e,t){const n=[];let r=t;for(;r!==e&&r!==null;r=r.parentNode){let i=0;for(let a=r.previousSibling;a!==null;a=a.previousSibling)i++;n.push(i)}return r!==e&&ae(225),n.reverse()}class wn extends er{constructor(n){super(n);ee(this,"__first");ee(this,"__last");ee(this,"__size");ee(this,"__format");ee(this,"__style");ee(this,"__indent");ee(this,"__dir");ee(this,"__textFormat");ee(this,"__textStyle");this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(n){super.afterCloneFrom(n),this.__key===n.__key&&(this.__first=n.__first,this.__last=n.__last,this.__size=n.__size),this.__indent=n.__indent,this.__format=n.__format,this.__style=n.__style,this.__dir=n.__dir,this.__textFormat=n.__textFormat,this.__textStyle=n.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){const n=this.getFormat();return Fj[n]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r),r=r.getNextSibling();return n}getChildrenKeys(){const n=[];let r=this.getFirstChild();for(;r!==null;)n.push(r.__key),r=r.getNextSibling();return n}getChildrenSize(){return this.getLatest().__size}isEmpty(){return this.getChildrenSize()===0}isDirty(){const n=et()._dirtyElements;return n!==null&&n.has(this.__key)}isLastChild(){const n=this.getLatest(),r=this.getParentOrThrow().getLastChild();return r!==null&&r.is(n)}getAllTextNodes(){const n=[];let r=this.getFirstChild();for(;r!==null;){if(ce(r)&&n.push(r),Q(r)){const i=r.getAllTextNodes();n.push(...i)}r=r.getNextSibling()}return n}getFirstDescendant(){let n=this.getFirstChild();for(;Q(n);){const r=n.getFirstChild();if(r===null)break;n=r}return n}getLastDescendant(){let n=this.getLastChild();for(;Q(n);){const r=n.getLastChild();if(r===null)break;n=r}return n}getDescendantByIndex(n){const r=this.getChildren(),i=r.length;if(n>=i){const s=r[i-1];return Q(s)&&s.getLastDescendant()||s||null}const a=r[n];return Q(a)&&a.getFirstDescendant()||a||null}getFirstChild(){const n=this.getLatest().__first;return n===null?null:kt(n)}getFirstChildOrThrow(){const n=this.getFirstChild();return n===null&&ae(45,this.__key),n}getLastChild(){const n=this.getLatest().__last;return n===null?null:kt(n)}getLastChildOrThrow(){const n=this.getLastChild();return n===null&&ae(96,this.__key),n}getChildAtIndex(n){const r=this.getChildrenSize();let i,a;if(n<r/2){for(i=this.getFirstChild(),a=0;i!==null&&a<=n;){if(a===n)return i;i=i.getNextSibling(),a++}return null}for(i=this.getLastChild(),a=r-1;i!==null&&a>=n;){if(a===n)return i;i=i.getPreviousSibling(),a--}return null}getTextContent(){let n="";const r=this.getChildren(),i=r.length;for(let a=0;a<i;a++){const s=r[a];n+=s.getTextContent(),Q(s)&&a!==i-1&&!s.isInline()&&(n+=nu)}return n}getTextContentSize(){let n=0;const r=this.getChildren(),i=r.length;for(let a=0;a<i;a++){const s=r[a];n+=s.getTextContentSize(),Q(s)&&a!==i-1&&!s.isInline()&&(n+=2)}return n}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(n){if(n!==""){const r=df[n];return(this.getFormat()&r)!==0}return!1}hasTextFormat(n){const r=Hi[n];return(this.getTextFormat()&r)!==0}getFormatFlags(n,r){return Mu(this.getLatest().__textFormat,n,r)}getTextStyle(){return this.getLatest().__textStyle}select(n,r){Ft();const i=de();let a=n,s=r;const o=this.getChildrenSize();if(!this.canBeEmpty()){if(n===0&&r===0){const u=this.getFirstChild();if(ce(u)||Q(u))return u.select(0,0)}else if(!(n!==void 0&&n!==o||r!==void 0&&r!==o)){const u=this.getLastChild();if(ce(u)||Q(u))return u.select()}}a===void 0&&(a=o),s===void 0&&(s=o);const l=this.__key;return ie(i)?(i.anchor.set(l,a,"element"),i.focus.set(l,s,"element"),i.dirty=!0,i):bx(l,a,l,s,"element","element")}selectStart(){const n=this.getFirstDescendant();return n?n.selectStart():this.select()}selectEnd(){const n=this.getLastDescendant();return n?n.selectEnd():this.select()}clear(){const n=this.getWritable();return this.getChildren().forEach(r=>r.remove()),n}append(...n){return this.splice(this.getChildrenSize(),0,n)}setDirection(n){const r=this.getWritable();return r.__dir=n,r}setFormat(n){return this.getWritable().__format=n!==""?df[n]:0,this}setStyle(n){return this.getWritable().__style=n||"",this}setTextFormat(n){const r=this.getWritable();return r.__textFormat=n,r}setTextStyle(n){const r=this.getWritable();return r.__textStyle=n,r}setIndent(n){return this.getWritable().__indent=n,this}splice(n,r,i){xu(this)&&ae(324,this.__key,this.__type);const a=this.getChildrenSize(),s=this.getWritable();n+r<=a||ae(226,String(n),String(r),String(a));const o=s.__key,l=[],u=[],c=this.getChildAtIndex(n+r);let d=null,f=a-r+i.length;if(n!==0)if(n===a)d=this.getLastChild();else{const p=this.getChildAtIndex(n);p!==null&&(d=p.getPreviousSibling())}if(r>0){let p=d===null?this.getFirstChild():d.getNextSibling();for(let m=0;m<r;m++){p===null&&ae(100);const v=p.getNextSibling(),x=p.__key;na(p.getWritable()),u.push(x),p=v}}let g=d;for(const p of i){g!==null&&p.is(g)&&(d=g=g.getPreviousSibling());const m=p.getWritable();m.__parent===o&&f--,na(m);const v=p.__key;if(g===null)s.__first=v,m.__prev=null;else{const x=g.getWritable();x.__next=v,m.__prev=x.__key}p.__key===o&&ae(76),m.__parent=o,l.push(v),g=p}if(n+r===a)g!==null&&(g.getWritable().__next=null,s.__last=g.__key);else if(c!==null){const p=c.getWritable();if(g!==null){const m=g.getWritable();p.__prev=g.__key,m.__next=c.__key}else p.__prev=null}if(s.__size=f,u.length){const p=de();if(ie(p)){const m=new Set(u),v=new Set(l),{anchor:x,focus:y}=p;Dx(x,m,v)&&Nu(x,x.getNode(),this,d,c),Dx(y,m,v)&&Nu(y,y.getNode(),this,d,c),f!==0||this.canBeEmpty()||fn(this)||this.remove()}}return s}getDOMSlot(n){return new ho(n)}exportDOM(n){const{element:r}=super.exportDOM(n);if(yt(r)){const i=this.getIndent();i>0&&(r.style.paddingInlineStart=40*i+"px");const a=this.getDirection();a&&(r.dir=a)}return{element:r}}exportJSON(){const n={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},r=this.getTextFormat(),i=this.getTextStyle();return r===0&&i===""||fn(this)||this.getChildren().some(ce)||(r!==0&&(n.textFormat=r),i!==""&&(n.textStyle=i)),n}updateFromJSON(n){return super.updateFromJSON(n).setFormat(n.format).setIndent(n.indent).setDirection(n.direction).setTextFormat(n.textFormat||0).setTextStyle(n.textStyle||"")}insertNewAfter(n,r){return null}canIndent(){return!0}collapseAtStart(n){return!1}excludeFromCopy(n){return!1}canReplaceWith(n){return!0}canInsertAfter(n){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(n){return!1}extractWithChild(n,r,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(n,r){const i=this.getDOMSlot(n);let a=i.getFirstChild();for(let s=this.getFirstChild();s;s=s.getNextSibling()){const o=r.getElementByKey(s.getKey());o!==null&&(a==null?(i.insertChild(o),a=o):a!==o&&i.replaceChild(o,a),a=a.nextSibling)}}}function Q(e){return e instanceof wn}function Dx(e,t,n){let r=e.getNode();for(;r;){const i=r.__key;if(t.has(i)&&!n.has(i))return!0;r=r.getParent()}return!1}class Ix extends er{decorate(t,n){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function Re(e){return e instanceof Ix}class Ga extends wn{constructor(){super("root");ee(this,"__cachedText");this.__cachedText=null}static getType(){return"root"}static clone(){return new Ga}getTopLevelElementOrThrow(){ae(51)}getTextContent(){const n=this.__cachedText;return!co()&&et()._dirtyType!==0||n===null?super.getTextContent():n}remove(){ae(52)}replace(n){ae(53)}insertBefore(n){ae(54)}insertAfter(n){ae(55)}updateDOM(n,r){return!1}splice(n,r,i){for(const a of i)Q(a)||Re(a)||ae(282);return super.splice(n,r,i)}static importJSON(n){return lt().updateFromJSON(n)}collapseAtStart(){return!0}}function wt(e){return e instanceof Ga}function Fx(e){return new po(new Map(e._nodeMap))}function Hf(){return new po(new Map([["root",new Ga]]))}function zx(e){const t=e.exportJSON(),n=e.constructor;if(t.type!==n.getType()&&ae(130,n.name),Q(e)){const r=t.children;Array.isArray(r)||ae(59,n.name);const i=e.getChildren();for(let a=0;a<i.length;a++){const s=zx(i[a]);r.push(s)}}return t}function LO(e){return e instanceof po}class po{constructor(t,n){ee(this,"_nodeMap");ee(this,"_selection");ee(this,"_flushSync");ee(this,"_readOnly");this._nodeMap=t,this._selection=n||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return this._nodeMap.size===1&&this._selection===null}read(t,n){return Px(n&&n.editor||null,this,t)}clone(t){const n=new po(this._nodeMap,t===void 0?this._selection:t);return n._readOnly=!0,n}toJSON(){return Px(null,this,()=>({root:zx(lt())}))}}class qf extends wn{static getType(){return"artificial"}createDOM(t){return document.createElement("div")}}class Xa extends wn{static getType(){return"paragraph"}static clone(t){return new Xa(t.__key)}createDOM(t){const n=document.createElement("p"),r=es(t.theme,"paragraph");return r!==void 0&&n.classList.add(...r),n}updateDOM(t,n,r){return!1}static importDOM(){return{p:t=>({conversion:DO,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(yt(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r)}return{element:n}}static importJSON(t){return tt().updateFromJSON(t)}exportJSON(){const t=super.exportJSON();if(t.textFormat===void 0||t.textStyle===void 0){const n=this.getChildren().find(ce);n?(t.textFormat=n.getFormat(),t.textStyle=n.getStyle()):(t.textFormat=this.getTextFormat(),t.textStyle=this.getTextStyle())}return t}insertNewAfter(t,n){const r=tt();r.setTextFormat(t.format),r.setTextStyle(t.style);const i=this.getDirection();return r.setDirection(i),r.setFormat(this.getFormatType()),r.setStyle(this.getStyle()),this.insertAfter(r,n),r}collapseAtStart(){const t=this.getChildren();if(t.length===0||ce(t[0])&&t[0].getTextContent().trim()===""){if(this.getNextSibling()!==null)return this.selectNext(),this.remove(),!0;if(this.getPreviousSibling()!==null)return this.selectPrevious(),this.remove(),!0}return!1}}function DO(e){const t=tt();if(e.style&&(t.setFormat(e.style.textAlign),dh(e,t)),t.getFormatType()===""){const n=e.getAttribute("align");n&&n&&n in df&&t.setFormat(n)}return{node:t}}function tt(){return tr(new Xa)}function Vf(e){return e instanceof Xa}const Oe=0,xr=1,IO=4;function Rx(e,t,n,r){const i=e._keyToDOMMap;i.clear(),e._editorState=Hf(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;const a=e._observer;a!==null&&(a.disconnect(),e._observer=null),t!==null&&(t.textContent=""),n!==null&&(n.textContent="",i.set("root",n))}function FO(e){const t=new Set,n=new Set;let r=e;for(;r;){const{ownNodeConfig:i}=Lu(r),a=r.transform;if(!n.has(a)){n.add(a);const s=r.transform();s&&t.add(s)}if(i){const s=i.$transform;s&&t.add(s),r=i.extends}else{const s=Object.getPrototypeOf(r);r=s.prototype instanceof er&&s!==er?s:void 0}}return t}function Bx(e){const t=e||{},n=PO(),r=t.theme||{},i=e===void 0?n:t.parentEditor||null,a=t.disableEvents||!1,s=Hf(),o=t.namespace||(i!==null?i._config.namespace:Qx()),l=t.editorState,u=[Ga,Ur,Ha,Va,Xa,qf,...t.nodes||[]],{onError:c,html:d}=t,f=t.editable===void 0||t.editable;let g;if(e===void 0&&n!==null)g=n._nodes;else{g=new Map;for(let m=0;m<u.length;m++){let v=u[m],x=null,y=null;if(typeof v!="function"){const w=v;v=w.replace,x=w.with,y=w.withKlass||null}Lu(v);const b=v.getType(),k=FO(v);g.set(b,{exportDOM:d&&d.export?d.export.get(v):void 0,klass:v,replace:x,replaceWithKlass:y,sharedNodeState:Kj(u[m]),transforms:k})}}const p=new ea(s,i,g,{disableEvents:a,namespace:o,theme:r},c||console.error,function(m,v){const x=new Map,y=new Set,b=k=>{Object.keys(k).forEach(w=>{let S=x.get(w);S===void 0&&(S=[],x.set(w,S)),S.push(k[w])})};return m.forEach(k=>{const w=k.klass.importDOM;if(w==null||y.has(w))return;y.add(w);const S=w.call(k.klass);S!==null&&b(S)}),v&&b(v),x}(g,d?d.import:void 0),f,e);return l!==void 0&&(p._pendingEditorState=l,p._dirtyType=2),function(m){m.registerCommand(T0,dO,Oe),m.registerCommand(C0,fO,Oe),m.registerCommand(M0,hO,Oe),m.registerCommand(j0,pO,Oe),m.registerCommand(O0,gO,Oe)}(p),p}class ea{constructor(t,n,r,i,a,s,o,l){ee(this,"_headless");ee(this,"_parentEditor");ee(this,"_rootElement");ee(this,"_editorState");ee(this,"_pendingEditorState");ee(this,"_compositionKey");ee(this,"_deferred");ee(this,"_keyToDOMMap");ee(this,"_updates");ee(this,"_updating");ee(this,"_listeners");ee(this,"_commands");ee(this,"_nodes");ee(this,"_decorators");ee(this,"_pendingDecorators");ee(this,"_config");ee(this,"_dirtyType");ee(this,"_cloneNotNeeded");ee(this,"_dirtyLeaves");ee(this,"_dirtyElements");ee(this,"_normalizedNodes");ee(this,"_updateTags");ee(this,"_observer");ee(this,"_key");ee(this,"_onError");ee(this,"_htmlConversions");ee(this,"_window");ee(this,"_editable");ee(this,"_blockCursorElement");ee(this,"_createEditorArgs");this._createEditorArgs=l,this._parentEditor=n,this._rootElement=null,this._editorState=t,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=i,this._nodes=r,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=Qx(),this._onError=a,this._htmlConversions=s,this._editable=o,this._headless=n!==null&&n._headless,this._window=null,this._blockCursorElement=null}isComposing(){return this._compositionKey!=null}registerUpdateListener(t){const n=this._listeners.update;return n.add(t),()=>{n.delete(t)}}registerEditableListener(t){const n=this._listeners.editable;return n.add(t),()=>{n.delete(t)}}registerDecoratorListener(t){const n=this._listeners.decorator;return n.add(t),()=>{n.delete(t)}}registerTextContentListener(t){const n=this._listeners.textcontent;return n.add(t),()=>{n.delete(t)}}registerRootListener(t){const n=this._listeners.root;return t(this._rootElement,null),n.add(t),()=>{t(null,this._rootElement),n.delete(t)}}registerCommand(t,n,r){r===void 0&&ae(35);const i=this._commands;i.has(t)||i.set(t,[new Set,new Set,new Set,new Set,new Set]);const a=i.get(t);a===void 0&&ae(36,String(t));const s=a[r];return s.add(n),()=>{s.delete(n),a.every(o=>o.size===0)&&i.delete(t)}}registerMutationListener(t,n,r){const i=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(t)).klass,a=this._listeners.mutation;let s=a.get(n);s===void 0&&(s=new Set,a.set(n,s)),s.add(i);const o=r&&r.skipInitialization;return o!==void 0&&o||this.initializeMutationListener(n,i),()=>{s.delete(i),s.size===0&&a.delete(n)}}getRegisteredNode(t){const n=this._nodes.get(t.getType());return n===void 0&&ae(37,t.name),n}resolveRegisteredNodeAfterReplacements(t){for(;t.replaceWithKlass;)t=this.getRegisteredNode(t.replaceWithKlass);return t}initializeMutationListener(t,n){const r=this._editorState,i=db(r).get(n.getType());if(!i)return;const a=new Map;for(const s of i.keys())a.set(s,"created");a.size>0&&t(a,{dirtyLeaves:new Set,prevEditorState:r,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(t,n){const r=this.getRegisteredNode(t);return r.transforms.add(n),r}registerNodeTransform(t,n){const r=this.registerNodeTransformToKlass(t,n),i=[r],a=r.replaceWithKlass;if(a!=null){const s=this.registerNodeTransformToKlass(a,n);i.push(s)}return function(s,o){const l=db(s.getEditorState()),u=[];for(const c of o){const d=l.get(c);d&&u.push(d)}u.length!==0&&s.update(()=>{for(const c of u)for(const d of c.keys()){const f=kt(d);f&&f.markDirty()}},s._pendingEditorState===null?{tag:Zi}:void 0)}(this,i.map(s=>s.klass.getType())),()=>{i.forEach(s=>s.transforms.delete(n))}}hasNode(t){return this._nodes.has(t.getType())}hasNodes(t){return t.every(this.hasNode.bind(this))}dispatchCommand(t,n){return pe(this,t,n)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(t){const n=this._rootElement;if(t!==n){const r=es(this._config.theme,"root"),i=this._pendingEditorState||this._editorState;if(this._rootElement=t,Rx(this,n,t,i),n!==null&&(this._config.disableEvents||mO(n),r!=null&&n.classList.remove(...r)),t!==null){const a=ah(t),s=t.style;s.userSelect="text",s.whiteSpace="pre-wrap",s.wordBreak="break-word",t.setAttribute("data-lexical-editor","true"),this._window=a,this._dirtyType=2,c0(this),this._updateTags.add(Zi),qr(this),this._config.disableEvents||function(o,l){const u=o.ownerDocument;Cf.set(o,u);const c=pu.get(u)??0;c<1&&u.addEventListener("selectionchange",ex),pu.set(u,c+1),o.__lexicalEditor=l;const d=Q0(o);for(let f=0;f<Tf.length;f++){const[g,p]=Tf[f],m=typeof p=="function"?v=>{nx(v)||(tx(v),(l.isEditable()||g==="click")&&p(v,l))}:v=>{if(nx(v))return;tx(v);const x=l.isEditable();switch(g){case"cut":return x&&pe(l,Nf,v);case"copy":return pe(l,hu,v);case"paste":return x&&pe(l,uu,v);case"dragstart":return x&&pe(l,U0,v);case"dragover":return x&&pe(l,H0,v);case"dragend":return x&&pe(l,aO,v);case"focus":return x&&pe(l,lO,v);case"blur":return x&&pe(l,uO,v);case"drop":return x&&pe(l,W0,v)}};o.addEventListener(g,m),d.push(()=>{o.removeEventListener(g,m)})}}(t,this),r!=null&&t.classList.add(...r)}else this._window=null,this._updateTags.add(Zi),qr(this);fo("root",this,!1,t,n)}}getElementByKey(t){return this._keyToDOMMap.get(t)||null}getEditorState(){return this._editorState}setEditorState(t,n){t.isEmpty()&&ae(38);let r=t;r._readOnly&&(r=Fx(t),r._selection=t._selection?t._selection.clone():null),u0(this);const i=this._pendingEditorState,a=this._updateTags,s=n!==void 0?n.tag:null;i===null||i.isEmpty()||(s!=null&&a.add(s),qr(this)),this._pendingEditorState=r,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,s!=null&&a.add(s),this._updating||qr(this)}parseEditorState(t,n){return function(r,i,a){const s=Hf(),o=$t,l=dn,u=Pt,c=i._dirtyElements,d=i._dirtyLeaves,f=i._cloneNotNeeded,g=i._dirtyType;i._dirtyElements=new Map,i._dirtyLeaves=new Set,i._cloneNotNeeded=new Set,i._dirtyType=0,$t=s,dn=!1,Pt=i,Yf(null);try{const p=i._nodes;Uf(r.root,p),a&&a(),s._readOnly=!0}catch(p){p instanceof Error&&i._onError(p)}finally{i._dirtyElements=c,i._dirtyLeaves=d,i._cloneNotNeeded=f,i._dirtyType=g,$t=o,dn=l,Pt=u}return s}(typeof t=="string"?JSON.parse(t):t,this,n)}read(t){return qr(this),this.getEditorState().read(t,{editor:this})}update(t,n){(function(r,i,a){r._updating?r._updates.push([i,a]):Tu(r,i,a)})(this,t,n)}focus(t,n={}){const r=this._rootElement;r!==null&&(r.setAttribute("autocapitalize","off"),yr(this,()=>{const i=de(),a=lt();i!==null?i.dirty||Yt(i.clone()):a.getChildrenSize()!==0&&(n.defaultSelection==="rootStart"?a.selectStart():a.selectEnd()),rh("focus"),UO(()=>{r.removeAttribute("autocapitalize"),t&&t()})}),this._pendingEditorState===null&&r.removeAttribute("autocapitalize"))}blur(){const t=this._rootElement;t!==null&&t.blur();const n=On(this._window);n!==null&&n.removeAllRanges()}isEditable(){return this._editable}setEditable(t){this._editable!==t&&(this._editable=t,fo("editable",this,!0,t))}toJSON(){return{editorState:this._editorState.toJSON()}}}ee(ea,"version"),ea.version="0.41.0+prod.esm";let Kf=null;function Yf(e){Kf=e}let zO=1;function Wx(e,t){const n=Gf(e,t);return n===void 0&&ae(30,t),n}function Gf(e,t){return e._nodes.get(t)}const RO=typeof queueMicrotask=="function"?queueMicrotask:e=>{Promise.resolve().then(e)};function Ux(e){return Re(Za(e))}function Xf(e){const t=document.activeElement;if(!yt(t))return!1;const n=t.nodeName;return Re(Za(e))&&(n==="INPUT"||n==="TEXTAREA"||t.contentEditable==="true"&&Cu(t)==null)}function go(e,t,n){const r=e.getRootElement();try{return r!==null&&r.contains(t)&&r.contains(n)&&t!==null&&!Xf(t)&&Hx(t)===e}catch{return!1}}function Jf(e){return e instanceof ea}function Hx(e){let t=e;for(;t!=null;){const n=Cu(t);if(Jf(n))return n;t=mo(t)}return null}function Cu(e){return e?e.__lexicalEditor:null}function ta(e){return wu(e)||e.isToken()}function Vr(e){return ta(e)||e.isSegmented()}function Kr(e){return ns(e)&&e.nodeType===3}function qx(e){return ns(e)&&e.nodeType===9}function Ja(e){let t=e;for(;t!=null;){if(Kr(t))return t;t=t.firstChild}return null}function Mu(e,t,n){const r=Hi[t];if(n!==null&&(e&r)===(n&r))return e;let i=e^r;return t==="subscript"?i&=-65:t==="superscript"?i&=-33:t==="lowercase"?(i&=-513,i&=-1025):t==="uppercase"?(i&=-257,i&=-1025):t==="capitalize"&&(i&=-257,i&=-513),i}function Vx(e){return ce(e)||qa(e)||Re(e)}function Kx(e,t){const n=function(){const s=Kf;return Kf=null,s}();if((t=t||n&&n.__key)!=null)return void(e.__key=t);Ft(),Cx();const r=et(),i=ci(),a=""+zO++;i._nodeMap.set(a,e),Q(e)?r._dirtyElements.set(a,!0):r._dirtyLeaves.add(a),r._cloneNotNeeded.add(a),r._dirtyType=1,e.__key=a}function na(e){const t=e.getParent();if(t!==null){const n=e.getWritable(),r=t.getWritable(),i=e.getPreviousSibling(),a=e.getNextSibling(),s=a!==null?a.__key:null,o=i!==null?i.__key:null,l=i!==null?i.getWritable():null,u=a!==null?a.getWritable():null;i===null&&(r.__first=s),a===null&&(r.__last=o),l!==null&&(l.__next=s),u!==null&&(u.__prev=o),n.__prev=null,n.__next=null,n.__parent=null,r.__size--}}function ju(e){Cx(),xu(e)&&ae(323,e.__key,e.__type);const t=e.getLatest(),n=t.__parent,r=ci(),i=et(),a=r._nodeMap,s=i._dirtyElements;n!==null&&function(l,u,c){let d=l;for(;d!==null;){if(c.has(d))return;const f=u.get(d);if(f===void 0)break;c.set(d,!1),d=f.__parent}}(n,a,s);const o=t.__key;i._dirtyType=1,Q(e)?s.set(o,!0):i._dirtyLeaves.add(o)}function zt(e){Ft();const t=et(),n=t._compositionKey;if(e!==n){if(t._compositionKey=e,n!==null){const r=kt(n);r!==null&&r.getWritable()}if(e!==null){const r=kt(e);r!==null&&r.getWritable()}}}function di(){return co()?null:et()._compositionKey}function kt(e,t){const n=(t||ci())._nodeMap.get(e);return n===void 0?null:n}function Yx(e,t){const n=Ou(e,et());return n!==void 0?kt(n,t):null}function Ou(e,t){return e[`__lexicalKey_${t._key}`]}function Za(e,t){let n=e;for(;n!=null;){const r=Yx(n,t);if(r!==null)return r;n=mo(n)}return null}function Gx(e){const t=e._decorators,n=Object.assign({},t);return e._pendingDecorators=n,n}function Xx(e){return e.read(()=>lt().getTextContent())}function lt(){return Jx(ci())}function Jx(e){return e._nodeMap.get("root")}function Yt(e){Ft();const t=ci();e!==null&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function Qa(e){const t=et(),n=function(r,i){let a=r;for(;a!=null;){const s=Ou(a,i);if(s!==void 0)return s;a=mo(a)}return null}(e,t);return n===null?e===t.getRootElement()?kt("root"):null:kt(n)}function Zx(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function Zf(e){const t=[];let n=e;for(;n!==null;)t.push(n),n=n._parentEditor;return t}function Qx(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function eb(e){return Kr(e)?e.nodeValue:null}function Qf(e,t,n){const r=On(kn(t));if(r===null)return;const i=r.anchorNode;let{anchorOffset:a,focusOffset:s}=r;if(i!==null){let o=eb(i);const l=Za(i);if(o!==null&&ce(l)){if((o===Qs||o===cf)&&n){const u=n.length;o=n,a=u,s=u}o!==null&&eh(l,o,a,s,e)}}}function eh(e,t,n,r,i){let a=e;if(a.isAttached()&&(i||!a.isDirty())){const s=a.isComposing();let o=t;if((s||i)&&(t.endsWith(Qs)&&(o=t.slice(0,-Qs.length)),i)){const u=cf;let c;for(;(c=o.indexOf(u))!==-1;)o=o.slice(0,c)+o.slice(c+u.length),n!==null&&n>c&&(n=Math.max(c,n-u.length)),r!==null&&r>c&&(r=Math.max(c,r-u.length))}const l=a.getTextContent();if(i||o!==l){if(o===""){if(zt(null),eu||Zs||tu)a.remove();else{const m=et();setTimeout(()=>{m.update(()=>{a.isAttached()&&a.remove()})},20)}return}const u=a.getParent(),c=Ya(),d=a.getTextContentSize(),f=di(),g=a.getKey();if(a.isToken()||f!==null&&g===f&&!s||ie(c)&&(u!==null&&!u.canInsertTextBefore()&&c.anchor.offset===0||c.anchor.key===e.__key&&c.anchor.offset===0&&!a.canInsertTextBefore()&&!s||c.focus.key===e.__key&&c.focus.offset===d&&!a.canInsertTextAfter()&&!s))return void a.markDirty();const p=de();if(!ie(p)||n===null||r===null)return void tb(a,o,p);if(p.setTextNodeRange(a,n,a,r),a.isSegmented()){const m=Ot(a.getTextContent());a.replace(m),a=m}tb(a,o,p)}}}function tb(e,t,n){if(e.setTextContent(t),ie(n)){const r=e.getKey();for(const i of["anchor","focus"]){const a=n[i];a.type==="text"&&a.key===r&&(a.offset=_r(e,a.offset,"clamp"))}}}function $u(e,t,n){const r=t[n]||!1;return r==="any"||r===e[n]}function BO(e,t){return $u(e,t,"altKey")&&$u(e,t,"ctrlKey")&&$u(e,t,"shiftKey")&&$u(e,t,"metaKey")}function Ye(e,t,n){if(!BO(e,n))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||e.key.length===1&&e.key.charCodeAt(0)<=127)return!1;const r="Key"+t.toUpperCase();return e.code===r}const Yr={ctrlKey:!Zn,metaKey:Zn},nb={altKey:Zn,ctrlKey:!Zn};function rb(e){return e.key==="Backspace"}function ib(e){return Ye(e,"a",Yr)}function WO(e){const t=lt();if(ie(e)){const n=e.anchor,r=e.focus,i=n.getNode().getTopLevelElementOrThrow().getParentOrThrow();return n.set(i.getKey(),0,"element"),r.set(i.getKey(),i.getChildrenSize(),"element"),qi(e),e}{const n=t.select(0,t.getChildrenSize());return Yt(qi(n)),n}}function es(e,t){e.__lexicalClassNameCache===void 0&&(e.__lexicalClassNameCache={});const n=e.__lexicalClassNameCache,r=n[t];if(r!==void 0)return r;const i=e[t];if(typeof i=="string"){const a=pi(i);return n[t]=a,a}return i}function th(e,t,n,r,i){if(n.size===0)return;const a=r.__type,s=r.__key,o=t.get(a);o===void 0&&ae(33,a);const l=o.klass;let u=e.get(l);u===void 0&&(u=new Map,e.set(l,u));const c=u.get(s),d=c==="destroyed"&&i==="created";(c===void 0||d)&&u.set(s,d?"updated":i)}function ab(e,t,n){const r=e.getParent();let i=n,a=e;return r!==null&&(t&&n===0?(i=a.getIndexWithinParent(),a=r):t||n!==a.getChildrenSize()||(i=a.getIndexWithinParent()+1,a=r)),a.getChildAtIndex(t?i-1:i)}function nh(e,t){const n=e.offset;if(e.type==="element")return ab(e.getNode(),t,n);{const r=e.getNode();if(t&&n===0||!t&&n===r.getTextContentSize()){const i=t?r.getPreviousSibling():r.getNextSibling();return i===null?ab(r.getParentOrThrow(),t,r.getIndexWithinParent()+(t?0:1)):i}}return null}function sb(e){const t=kn(e).event,n=t&&t.inputType;return n==="insertFromPaste"||n==="insertFromPasteAsQuotation"}function pe(e,t,n){return function(r,i,a){const s=Zf(r);for(let o=4;o>=0;o--)for(let l=0;l<s.length;l++){const u=s[l],c=u._commands.get(i);if(c!==void 0){const d=c[o];if(d!==void 0){const f=Array.from(d),g=f.length;let p=!1;if(yr(u,()=>{for(let m=0;m<g;m++)if(f[m](a,r))return void(p=!0)}),p)return p}}}return!1}(e,t,n)}function ts(e,t){const n=e._keyToDOMMap.get(t);return n===void 0&&ae(75,t),n}function mo(e){const t=e.assignedSlot||e.parentElement;return uh(t)?t.host:t}function ob(e){return qx(e)?e:yt(e)?e.ownerDocument:null}function rh(e){Ft(),et()._updateTags.add(e)}function UO(e){Ft(),et()._deferred.push(e)}function ih(e,t){let n=e.getParent();for(;n!==null;){if(n.is(t))return!0;n=n.getParent()}return!1}function ah(e){const t=ob(e);return t?t.defaultView:null}function kn(e){const t=e._window;return t===null&&ae(78),t}function HO(e){let t=e.getParentOrThrow();for(;t!==null;){if(fn(t))return t;t=t.getParentOrThrow()}return t}function fn(e){return wt(e)||Q(e)&&e.isShadowRoot()}function lb(e){const t=e.constructor.clone(e);return Kx(t,null),t.afterCloneFrom(e),t}function tr(e){const t=et(),n=e.getType(),r=Gf(t,n);r===void 0&&ae(200,e.constructor.name,n);const{replace:i,replaceWithKlass:a}=r;if(i!==null){const s=i(e),o=s.constructor;return a!==null?s instanceof a||ae(201,a.name,a.getType(),o.name,o.getType(),e.constructor.name,n):s instanceof e.constructor&&o!==e.constructor||ae(202,o.name,o.getType(),e.constructor.name,n),s.__key===e.__key&&ae(203,e.constructor.name,n,o.name,o.getType()),s}return e}function sh(e,t){!wt(e.getParent())||Q(t)||Re(t)||ae(99)}function qO(e){const t=kt(e);return t===null&&ae(63,e),t}function oh(e){return(Re(e)||Q(e)&&!e.canBeEmpty())&&!e.isInline()}function lh(e,t,n){n.style.removeProperty("caret-color"),t._blockCursorElement=null;const r=e.parentElement;r!==null&&r.removeChild(e)}function On(e){return Jn?(e||window).getSelection():null}function VO(e){const t=ah(e);return t?t.getSelection():null}function ub(e){return yt(e)&&e.tagName==="A"}function yt(e){return ns(e)&&e.nodeType===1}function ns(e){return typeof e=="object"&&e!==null&&"nodeType"in e&&typeof e.nodeType=="number"}function uh(e){return ns(e)&&e.nodeType===11}function ch(e){const t=new RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return e.nodeName.match(t)!==null}function Pu(e){const t=new RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return e.nodeName.match(t)!==null}function $n(e){if(Re(e)&&!e.isInline())return!0;if(!Q(e)||fn(e))return!1;const t=e.getFirstChild(),n=t===null||qa(t)||ce(t)||t.isInline();return!e.isInline()&&e.canBeEmpty()!==!1&&n}function Au(){return et()}const cb=new WeakMap,KO=new Map;function db(e){if(!e._readOnly&&e.isEmpty())return KO;e._readOnly||ae(192);let t=cb.get(e);return t||(t=function(n){const r=new Map;for(const[i,a]of n._nodeMap){const s=a.__type;let o=r.get(s);o||(o=new Map,r.set(s,o)),o.set(i,a)}return r}(e),cb.set(e,t)),t}function fb(e){const t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function YO(e){return(t=fb(e))[rx]=!0,t;var t}function dh(e,t){const n=parseInt(e.style.paddingInlineStart,10)||0,r=Math.round(n/40);t.setIndent(r)}function GO(e){return e.__lexicalUnmanaged===!0}function vo(e,t){return function(n,r){return Object.prototype.hasOwnProperty.call(n,r)}(e,t)&&e[t]!==er[t]}function Lu(e){const t=s0 in e.prototype?e.prototype[s0]():void 0,n=function(s){if(!(s===er||s.prototype instanceof er)){let o="<unknown>",l="<unknown>";try{o=s.getType()}catch{}try{ea.version&&(l=JSON.parse(ea.version))}catch{}ae(290,s.name,o,l)}return s===Ix||s===wn||s===er}(e),r=!n&&vo(e,"getType")?e.getType():void 0;let i,a=r;if(t)if(r)i=t[r];else for(const[s,o]of Object.entries(t))a=s,i=o;if(!n&&a&&(vo(e,"getType")||(e.getType=()=>a),vo(e,"clone")||(e.clone=s=>(Yf(s),new e)),vo(e,"importJSON")||(e.importJSON=i&&i.$importJSON||(s=>new e().updateFromJSON(s))),!vo(e,"importDOM")&&i)){const{importDOM:s}=i;s&&(e.importDOM=()=>s)}return{ownNodeConfig:i,ownNodeType:a}}function XO(e){const t=Au();return Ft(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}const Rt=(e,t)=>{let n=e;for(;n!=null&&!wt(n);){if(t(n))return n;n=n.getParent()}return null},JO={next:"previous",previous:"next"};class fh{constructor(t){ee(this,"origin");this.origin=t}[Symbol.iterator](){return pb({hasNext:rs,initial:this.getAdjacentCaret(),map:t=>t,step:t=>t.getAdjacentCaret()})}getAdjacentCaret(){return St(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return St(this.origin,this.direction)}remove(){const t=this.getNodeAtCaret();return t&&t.remove(),this}replaceOrInsert(t,n){const r=this.getNodeAtCaret();return t.is(this.origin)||t.is(r)||(r===null?this.insert(t):r.replace(t,n)),this}splice(t,n,r="next"){const i=r===this.direction?n:Array.from(n).reverse();let a=this;const s=this.getParentAtCaret(),o=new Map;for(let l=a.getAdjacentCaret();l!==null&&o.size<t;l=l.getAdjacentCaret()){const u=l.origin.getWritable();o.set(u.getKey(),u)}for(const l of i){if(o.size>0){const u=a.getNodeAtCaret();if(u){if(o.delete(u.getKey()),o.delete(l.getKey()),!(u.is(l)||a.origin.is(l))){const c=l.getParent();c&&c.is(s)&&l.remove(),u.replace(l)}}else u===null&&ae(263,Array.from(o).join(" "))}else a.insert(l);a=St(l,this.direction)}for(const l of o.values())l.remove();return this}}class yo extends fh{constructor(){super(...arguments);ee(this,"type","child")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:Pn(n,this.direction)}getParentCaret(n="root"){return St(hh(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=ra(this.direction);return St(this.getNodeAtCaret(),n)||Pn(this.origin,n)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(n){return n instanceof yo&&this.direction===n.direction&&this.origin.is(n.origin)}isSamePointCaret(n){return this.isSameNodeCaret(n)}}const ZO={root:wt,shadowRoot:fn};function ra(e){return JO[e]}function hh(e,t="root"){return ZO[t](e)?null:e}class ia extends fh{constructor(){super(...arguments);ee(this,"type","sibling")}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:St(n,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return Q(this.origin)?Pn(this.origin,this.direction):null}getParentCaret(n="root"){return St(hh(this.getParentAtCaret(),n),this.direction)}getFlipped(){const n=ra(this.direction);return St(this.getNodeAtCaret(),n)||Pn(this.origin.getParentOrThrow(),n)}isSamePointCaret(n){return n instanceof ia&&this.direction===n.direction&&this.origin.is(n.origin)}isSameNodeCaret(n){return(n instanceof ia||n instanceof aa)&&this.direction===n.direction&&this.origin.is(n.origin)}}class aa extends fh{constructor(n,r){super(n);ee(this,"type","text");ee(this,"offset");this.offset=r}getLatest(){const n=this.origin.getLatest();return n===this.origin?this:sa(n,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(n="root"){return St(hh(this.getParentAtCaret(),n),this.direction)}getFlipped(){return sa(this.origin,ra(this.direction),this.offset)}isSamePointCaret(n){return n instanceof aa&&this.direction===n.direction&&this.origin.is(n.origin)&&this.offset===n.offset}isSameNodeCaret(n){return(n instanceof ia||n instanceof aa)&&this.direction===n.direction&&this.origin.is(n.origin)}getSiblingCaret(){return St(this.origin,this.direction)}}function br(e){return e instanceof aa}function rs(e){return e instanceof ia}function nr(e){return e instanceof yo}const QO={next:class extends aa{constructor(){super(...arguments);ee(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends aa{constructor(){super(...arguments);ee(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},e$={next:class extends ia{constructor(){super(...arguments);ee(this,"direction","next")}getNodeAtCaret(){return this.origin.getNextSibling()}insert(t){return this.origin.insertAfter(t),this}},previous:class extends ia{constructor(){super(...arguments);ee(this,"direction","previous")}getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(t){return this.origin.insertBefore(t),this}}},t$={next:class extends yo{constructor(){super(...arguments);ee(this,"direction","next")}getNodeAtCaret(){return this.origin.getFirstChild()}insert(t){return this.origin.splice(0,0,[t]),this}},previous:class extends yo{constructor(){super(...arguments);ee(this,"direction","previous")}getNodeAtCaret(){return this.origin.getLastChild()}insert(t){return this.origin.splice(this.origin.getChildrenSize(),0,[t]),this}}};function St(e,t){return e?new e$[t](e):null}function sa(e,t,n){return e?new QO[t](e,_r(e,n)):null}function _r(e,t,n="error"){const r=e.getTextContentSize();let i=t==="next"?r:t==="previous"?0:t;return(i<0||i>r)&&(n!=="clamp"&&r0(284,String(t),String(r),e.getKey()),i=i<0?0:r),i}function hb(e,t){return new r$(e,t)}function Pn(e,t){return Q(e)?new t$[t](e):null}function n$(e){return e&&e.getChildCaret()||e}function ph(e){return e&&n$(e.getAdjacentCaret())}class gh{constructor(t,n,r){ee(this,"type","node-caret-range");ee(this,"direction");ee(this,"anchor");ee(this,"focus");this.anchor=t,this.focus=n,this.direction=r}getLatest(){const t=this.anchor.getLatest(),n=this.focus.getLatest();return t===this.anchor&&n===this.focus?this:new gh(t,n,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){const t=i=>{const a=this[i].getLatest();return br(a)?function(s,o){const{direction:l,origin:u}=s,c=_r(u,o==="focus"?ra(l):l);return hb(s,c-s.offset)}(a,i):null},n=t("anchor"),r=t("focus");if(n&&r){const{caret:i}=n,{caret:a}=r;if(i.isSameNodeCaret(a))return[hb(i,a.offset-i.offset),null]}return[n,r]}iterNodeCarets(t="root"){const n=br(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),r=this.focus.getLatest(),i=br(r),a=s=>s.isSameNodeCaret(r)?null:ph(s)||s.getParentCaret(t);return pb({hasNext:s=>s!==null&&!(i&&r.isSameNodeCaret(s)),initial:n.isSameNodeCaret(r)?null:a(n),map:s=>s,step:a})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class r${constructor(t,n){ee(this,"type","slice");ee(this,"caret");ee(this,"distance");this.caret=t,this.distance=n}getSliceIndices(){const{distance:t,caret:{offset:n}}=this,r=n+t;return r<n?[r,n]:[n,r]}getTextContent(){const[t,n]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(t,n)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){const{caret:{origin:t,direction:n}}=this,[r,i]=this.getSliceIndices(),a=t.getTextContent();return sa(t.setTextContent(a.slice(0,r)+a.slice(i)),n,r)}}function mh(e){return fi(e,St(lt(),e.direction))}function i$(e){return fi(e,e)}function fi(e,t){return e.direction!==t.direction&&ae(265),new gh(e,t,e.direction)}function pb(e){const{initial:t,hasNext:n,step:r,map:i}=e;let a=t;return{[Symbol.iterator](){return this},next(){if(!n(a))return{done:!0,value:void 0};const s={done:!1,value:i(a)};return a=r(a),s}}}function gb(e,t){const n=Iu(e.origin,t.origin);switch(n===null&&ae(275,e.origin.getKey(),t.origin.getKey()),n.type){case"same":{const r=e.type==="text",i=t.type==="text";return r&&i?function(a,s){return Math.sign(a-s)}(e.offset,t.offset):e.type===t.type?0:r?-1:i?1:e.type==="child"?-1:1}case"ancestor":return e.type==="child"?-1:1;case"descendant":return t.type==="child"?1:-1;case"branch":return mb(n)}}function mb(e){const{a:t,b:n}=e,r=t.__key,i=n.__key;let a=t,s=n;for(;a&&s;a=a.getNextSibling(),s=s.getNextSibling()){if(a.__key===i)return-1;if(s.__key===r)return 1}return a===null?1:-1}function Du(e,t){return t.is(e)}function vb(e){return Q(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function Iu(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};const n=new Map;for(let[r,i]=vb(e);r;i=r,r=r.getParent())n.set(r,i);for(let[r,i]=vb(t);r;i=r,r=r.getParent()){const a=n.get(r);if(a!==void 0)return a===null?(Du(e,r)||ae(276),{commonAncestor:r,type:"ancestor"}):i===null?(Du(t,r)||ae(277),{commonAncestor:r,type:"descendant"}):((Q(a)||Du(e,a))&&(Q(i)||Du(t,i))&&r.is(a.getParent())&&r.is(i.getParent())||ae(278),{a,b:i,commonAncestor:r,type:"branch"})}return null}function wr(e,t){const{type:n,key:r,offset:i}=e,a=qO(e.key);return n==="text"?(ce(a)||ae(266,a.getType(),r),sa(a,t,i)):(Q(a)||ae(267,a.getType(),r),o$(a,e.offset,t))}function hi(e,t){const{origin:n,direction:r}=t,i=r==="next";br(t)?e.set(n.getKey(),t.offset,"text"):rs(t)?ce(n)?e.set(n.getKey(),_r(n,r),"text"):e.set(n.getParentOrThrow().getKey(),n.getIndexWithinParent()+(i?1:0),"element"):(nr(t)&&Q(n)||ae(268),e.set(n.getKey(),i?0:n.getChildrenSize(),"element"))}function a$(e){const t=de(),n=ie(t)?t:zf();return Fu(n,e),Yt(n),n}function Fu(e,t){hi(e.anchor,t.anchor),hi(e.focus,t.focus)}function yb(e){const{anchor:t,focus:n}=e,r=wr(t,"next"),i=wr(n,"next"),a=gb(r,i)<=0?"next":"previous";return fi(Gr(r,a),Gr(i,a))}function is(e){const{direction:t,origin:n}=e,r=St(n,ra(t)).getNodeAtCaret();return r?St(r,t):Pn(n.getParentOrThrow(),t)}function xb(e,t="root"){const n=[e];for(let r=nr(e)?e.getParentCaret(t):e.getSiblingCaret();r!==null;r=r.getParentCaret(t))n.push(is(r));return n}function vh(e){return!!e&&e.origin.isAttached()}function s$(e,t="removeEmptySlices"){if(e.isCollapsed())return e;const n="root",r="next";let i=t;const a=_b(e,r),s=xb(a.anchor,n),o=xb(a.focus.getFlipped(),n),l=new Set,u=[];for(const p of a.iterNodeCarets(n))if(nr(p))l.add(p.origin.getKey());else if(rs(p)){const{origin:m}=p;Q(m)&&!l.has(m.getKey())||u.push(m)}for(const p of u)p.remove();for(const p of a.getTextSlices()){if(!p)continue;const{origin:m}=p.caret,v=m.getTextContentSize(),x=is(St(m,r)),y=m.getMode();if(Math.abs(p.distance)===v&&i==="removeEmptySlices"||y==="token"&&p.distance!==0)x.remove();else if(p.distance!==0){i="removeEmptySlices";let b=p.removeTextSlice();const k=p.caret.origin;if(y==="segmented"){const w=b.origin,S=Ot(w.getTextContent()).setStyle(w.getStyle()).setFormat(w.getFormat());x.replaceOrInsert(S),b=sa(S,r,b.offset)}k.is(s[0].origin)&&(s[0]=b),k.is(o[0].origin)&&(o[0]=b.getFlipped())}}let c,d;for(const p of s)if(vh(p)){c=Sn(p);break}for(const p of o)if(vh(p)){d=Sn(p);break}const f=function(p,m,v){if(!p||!m)return null;const x=p.getParentAtCaret(),y=m.getParentAtCaret();if(!x||!y)return null;const b=x.getParents().reverse();b.push(x);const k=y.getParents().reverse();k.push(y);const w=Math.min(b.length,k.length);let S;for(S=0;S<w&&b[S]===k[S];S++);const N=(C,O)=>{let $;for(let M=S;M<C.length;M++){const j=C[M];if(fn(j))return;!$&&O(j)&&($=j)}return $},E=N(b,$n),T=E&&N(k,C=>v.has(C.getKey())&&$n(C));return E&&T?[E,T]:null}(c,d,l);if(f){const[p,m]=f;Pn(p,"previous").splice(0,m.getChildren());let v=m.getParent();for(m.remove(!0);v&&v.isEmpty();){const x=v;v=v.getParent(),x.remove(!0)}}const g=[c,d,...s,...o].find(vh);if(g)return i$(Gr(Sn(g),e.direction));ae(269,JSON.stringify(s.map(p=>p.origin.__key)))}function Sn(e){const t=function(i){let a=i;for(;nr(a);){const s=ph(a);if(!nr(s))break;a=s}return a}(e.getLatest()),{direction:n}=t;if(ce(t.origin))return br(t)?t:sa(t.origin,n,n);const r=t.getAdjacentCaret();return rs(r)&&ce(r.origin)?sa(r.origin,n,ra(n)):t}function bb(e){return br(e)&&e.offset!==_r(e.origin,e.direction)}function Gr(e,t){return e.direction===t?e:e.getFlipped()}function _b(e,t){return e.direction===t?e:fi(Gr(e.focus,t),Gr(e.anchor,t))}function o$(e,t,n){let r=Pn(e,"next");for(let i=0;i<t;i++){const a=r.getAdjacentCaret();if(a===null)break;r=a}return Gr(r,n)}function l$(e){const{origin:t,offset:n,direction:r}=e;if(n===_r(t,r))return e.getSiblingCaret();if(n===_r(t,ra(r)))return is(e.getSiblingCaret());const[i]=t.splitText(n);return ce(i)||ae(281),Gr(St(i,"next"),r)}function u$(e,t){return!0}function c$(e,{$copyElementNode:t=lb,$splitTextPointCaretNext:n=l$,rootMode:r="shadowRoot",$shouldSplit:i=u$}={}){if(br(e))return n(e);const a=e.getParentCaret(r);if(a){const{origin:s}=a;if(nr(e)&&(!s.canBeEmpty()||!i(s,"first")))return is(a);const o=function(l){const u=[];for(let c=l.getAdjacentCaret();c;c=c.getAdjacentCaret())u.push(c.origin);return u}(e);(o.length>0||s.canBeEmpty()&&i(s,"last"))&&a.insert(t(s).splice(0,0,o))}return a}function X7(e){return e}function d$(...e){return e}function J7(e){return e}function f$(e,t){if(!t||e===t)return e;for(const n in t)if(e[n]!==t[n])return{...e,...t};return e}function pi(...e){const t=[];for(const n of e)if(n&&typeof n=="string")for(const[r]of n.matchAll(/\S+/g))t.push(r);return t}function Xr(e,...t){const n=pi(...t);n.length>0&&e.classList.add(...n)}function yh(e,...t){const n=pi(...t);n.length>0&&e.classList.remove(...n)}function kr(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}const wb=_.createContext(null);function h$(e,t){return{getTheme:function(){return t??null}}}function Jr(){const e=_.useContext(wb);return e==null&&function(t,...n){const r=new URL("https://lexical.dev/docs/error"),i=new URLSearchParams;i.append("code",t);for(const a of n)i.append("v",a);throw r.search=i.toString(),Error(`Minified Lexical error #${t}; visit ${r.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(8),e}const kb=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,p$=kb?_.useLayoutEffect:_.useEffect,zu={tag:Zi};function g$({initialConfig:e,children:t}){const n=_.useMemo(()=>{const{theme:r,namespace:i,nodes:a,onError:s,editorState:o,html:l}=e,u=h$(null,r),c=Bx({editable:e.editable,html:l,namespace:i,nodes:a,onError:d=>s(d,c),theme:r});return function(d,f){if(f!==null){if(f===void 0)d.update(()=>{const g=lt();if(g.isEmpty()){const p=tt();g.append(p);const m=kb?document.activeElement:null;(de()!==null||m!==null&&m===d.getRootElement())&&p.select()}},zu);else if(f!==null)switch(typeof f){case"string":{const g=d.parseEditorState(f);d.setEditorState(g,zu);break}case"object":d.setEditorState(f,zu);break;case"function":d.update(()=>{lt().isEmpty()&&f(d)},zu)}}}(c,o),[c,u]},[]);return p$(()=>{const r=e.editable,[i]=n;i.setEditable(r===void 0||r)},[]),h.jsx(wb.Provider,{value:n,children:t})}const m$=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function v$(e){return{initialValueFn:()=>e.isEditable(),subscribe:t=>e.registerEditableListener(t)}}function y$(){return function(e){const[t]=Jr(),n=_.useMemo(()=>e(t),[t,e]),[r,i]=_.useState(()=>n.initialValueFn()),a=_.useRef(r);return m$(()=>{const{initialValueFn:s,subscribe:o}=n,l=s();return a.current!==l&&(a.current=l,i(l)),o(u=>{a.current=u,i(u)})},[n,e]),r}(v$)}const xh=new Map;function Sb(e){const t={};if(!e)return t;const n=e.split(";");for(const r of n)if(r!==""){const[i,a]=r.split(/:([^]+)/);i&&a&&(t[i.trim()]=a.trim())}return t}function Nb(e){let t=xh.get(e);return t===void 0&&(t=Sb(e),xh.set(e,t)),t}function Eb(e){const t=Au().getElementByKey(e.getKey());if(t===null)return null;const n=t.ownerDocument.defaultView;return n===null?null:n.getComputedStyle(t)}function Tb(e){return Eb(wt(e)?e:e.getParentOrThrow())}function Cb(e){const t=Tb(e);return t!==null&&t.direction==="rtl"}function Mb(e,t,n="self"){const r=e.getStartEndPoints();if(t.isSelected(e)&&!Vr(t)&&r!==null){const[i,a]=r,s=e.isBackward(),o=i.getNode(),l=a.getNode(),u=t.is(o),c=t.is(l);if(u||c){const[d,f]=If(e),g=o.is(l),p=t.is(s?l:o),m=t.is(s?o:l);let v,x=0;g?(x=d>f?f:d,v=d>f?d:f):p?(x=s?f:d,v=void 0):m&&(x=0,v=s?d:f);const y=t.__text.slice(x,v);y!==t.__text&&(n==="clone"&&(t=YO(t)),t.__text=y)}}return t}function x$(e){const t=e.getStyle(),n=Sb(t);xh.set(t,n)}function b$(e,t){const n=e.getFormatType(),r=e.getIndent();n!==t.getFormatType()&&t.setFormat(n),r!==t.getIndent()&&t.setIndent(r)}function xo(e,t,n=b$){if(e===null)return;const r=e.getStartEndPoints(),i=new Map;let a=null;if(r){const[s,o]=r;a=zf(),a.anchor.set(s.key,s.offset,s.type),a.focus.set(o.key,o.offset,o.type);const l=Rt(s.getNode(),$n),u=Rt(o.getNode(),$n);Q(l)&&i.set(l.getKey(),l),Q(u)&&i.set(u.getKey(),u)}for(const s of e.getNodes())if(Q(s)&&$n(s))i.set(s.getKey(),s);else if(r===null){const o=Rt(s,$n);Q(o)&&i.set(o.getKey(),o)}for(const[s,o]of i){const l=t();n(o,l),o.replace(l,!0),a&&(s===a.anchor.key&&a.anchor.set(l.getKey(),a.anchor.offset,a.anchor.type),s===a.focus.key&&a.focus.set(l.getKey(),a.focus.offset,a.focus.type))}a&&e.is(de())&&Yt(a)}function jb(e){const t=Ob(e);return t!==null&&t.writingMode==="vertical-rl"}function Ob(e){const t=e.anchor.getNode();return Q(t)?Eb(t):Tb(t)}function $b(e,t){let n=jb(e)?!t:t;Pb(e)&&(n=!n);const r=wr(e.focus,n?"previous":"next");if(bb(r))return!1;for(const i of mh(r)){if(nr(i))return!i.origin.isInline();if(!Q(i.origin)){if(Re(i.origin))return!0;break}}return!1}function _$(e,t,n,r){e.modify(t?"extend":"move",n,r)}function Pb(e){const t=Ob(e);return t!==null&&t.direction==="rtl"}function Ab(e,t,n){const r=Pb(e);let i;i=jb(e)||r?!n:n,_$(e,t,i,"character")}function Lb(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Db=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,w$=Db&&"documentMode"in document?document.documentMode:null;!(!Db||!("InputEvent"in window)||w$)&&"getTargetRanges"in new window.InputEvent("input");function k$(e){return e?e.getAdjacentCaret():null}function S$(e,t){let n=e;for(;n!=null;){if(n instanceof t)return n;n=n.getParent()}return null}function N$(e){const t=Rt(e,n=>Q(n)&&!n.isInline());return Q(t)||Lb(4,e.__key),t}function E$(e,t,n){let r=Gr(t,"next");for(let i=r;i;i=c$(i,n))r=i;return br(r)&&Lb(283),r.insert(e.isInline()?tt().append(e):e),Gr(St(e.getLatest(),"next"),t.direction)}function gi(e,t){return e!==null&&Object.getPrototypeOf(e).constructor.name===t.name}function Ib(e){const t=de();if(!ie(t))return!1;const n=new Set,r=t.getNodes();for(let i=0;i<r.length;i++){const a=r[i],s=a.getKey();if(n.has(s))continue;const o=Rt(a,u=>Q(u)&&!u.isInline());if(o===null)continue;const l=o.getKey();o.canIndent()&&!n.has(l)&&(n.add(l),e(o))}return n.size>0}const T$=Symbol.for("preact-signals");function Ru(){if(mi>1)return void mi--;let e,t=!1;for(;bo!==void 0;){let n=bo;for(bo=void 0,bh++;n!==void 0;){const r=n.o;if(n.o=void 0,n.f&=-3,!(8&n.f)&&Rb(n))try{n.c()}catch(i){t||(e=i,t=!0)}n=r}}if(bh=0,mi--,t)throw e}function C$(e){if(mi>0)return e();mi++;try{return e()}finally{Ru()}}let Ue,bo;function Fb(e){const t=Ue;Ue=void 0;try{return e()}finally{Ue=t}}let mi=0,bh=0,Bu=0;function zb(e){if(Ue===void 0)return;let t=e.n;return t===void 0||t.t!==Ue?(t={i:0,S:e,p:Ue.s,n:void 0,t:Ue,e:void 0,x:void 0,r:t},Ue.s!==void 0&&(Ue.s.n=t),Ue.s=t,e.n=t,32&Ue.f&&e.S(t),t):t.i===-1?(t.i=0,t.n!==void 0&&(t.n.p=t.p,t.p!==void 0&&(t.p.n=t.n),t.p=Ue.s,t.n=void 0,Ue.s.n=t,Ue.s=t),t):void 0}function Zt(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function M$(e,t){return new Zt(e,t)}function Rb(e){for(let t=e.s;t!==void 0;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function Bb(e){for(let t=e.s;t!==void 0;t=t.n){const n=t.S.n;if(n!==void 0&&(t.r=n),t.S.n=t,t.i=-1,t.n===void 0){e.s=t;break}}}function Wb(e){let t,n=e.s;for(;n!==void 0;){const r=n.p;n.i===-1?(n.S.U(n),r!==void 0&&(r.n=n.n),n.n!==void 0&&(n.n.p=r)):t=n,n.S.n=n.r,n.r!==void 0&&(n.r=void 0),n=r}e.s=t}function as(e,t){Zt.call(this,void 0),this.x=e,this.s=void 0,this.g=Bu-1,this.f=4,this.W=t==null?void 0:t.watched,this.Z=t==null?void 0:t.unwatched,this.name=t==null?void 0:t.name}function Ub(e){const t=e.u;if(e.u=void 0,typeof t=="function"){mi++;const n=Ue;Ue=void 0;try{t()}catch(r){throw e.f&=-2,e.f|=8,_h(e),r}finally{Ue=n,Ru()}}}function _h(e){for(let t=e.s;t!==void 0;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,Ub(e)}function j$(e){if(Ue!==this)throw new Error("Out-of-order effect");Wb(this),Ue=e,this.f&=-2,8&this.f&&_h(this),Ru()}function ss(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=t==null?void 0:t.name}function _o(e,t){const n=new ss(e,t);try{n.c()}catch(i){throw n.d(),i}const r=n.d.bind(n);return r[Symbol.dispose]=r,r}function Hb(e,t={}){const n={};for(const r in e){const i=t[r],a=M$(i===void 0?e[r]:i);n[r]=a}return n}Zt.prototype.brand=T$,Zt.prototype.h=function(){return!0},Zt.prototype.S=function(e){const t=this.t;t!==e&&e.e===void 0&&(e.x=t,this.t=e,t!==void 0?t.e=e:Fb(()=>{var n;(n=this.W)==null||n.call(this)}))},Zt.prototype.U=function(e){if(this.t!==void 0){const t=e.e,n=e.x;t!==void 0&&(t.x=n,e.e=void 0),n!==void 0&&(n.e=t,e.x=void 0),e===this.t&&(this.t=n,n===void 0&&Fb(()=>{var r;(r=this.Z)==null||r.call(this)}))}},Zt.prototype.subscribe=function(e){return _o(()=>{const t=this.value,n=Ue;Ue=void 0;try{e(t)}finally{Ue=n}},{name:"sub"})},Zt.prototype.valueOf=function(){return this.value},Zt.prototype.toString=function(){return this.value+""},Zt.prototype.toJSON=function(){return this.value},Zt.prototype.peek=function(){const e=Ue;Ue=void 0;try{return this.value}finally{Ue=e}},Object.defineProperty(Zt.prototype,"value",{get(){const e=zb(this);return e!==void 0&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(bh>100)throw new Error("Cycle detected");this.v=e,this.i++,Bu++,mi++;try{for(let t=this.t;t!==void 0;t=t.x)t.t.N()}finally{Ru()}}}}),as.prototype=new Zt,as.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if((36&this.f)==32||(this.f&=-5,this.g===Bu))return!0;if(this.g=Bu,this.f|=1,this.i>0&&!Rb(this))return this.f&=-2,!0;const e=Ue;try{Bb(this),Ue=this;const t=this.x();(16&this.f||this.v!==t||this.i===0)&&(this.v=t,this.f&=-17,this.i++)}catch(t){this.v=t,this.f|=16,this.i++}return Ue=e,Wb(this),this.f&=-2,!0},as.prototype.S=function(e){if(this.t===void 0){this.f|=36;for(let t=this.s;t!==void 0;t=t.n)t.S.S(t)}Zt.prototype.S.call(this,e)},as.prototype.U=function(e){if(this.t!==void 0&&(Zt.prototype.U.call(this,e),this.t===void 0)){this.f&=-33;for(let t=this.s;t!==void 0;t=t.n)t.S.U(t)}},as.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;e!==void 0;e=e.x)e.t.N()}},Object.defineProperty(as.prototype,"value",{get(){if(1&this.f)throw new Error("Cycle detected");const e=zb(this);if(this.h(),e!==void 0&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),ss.prototype.c=function(){const e=this.S();try{if(8&this.f||this.x===void 0)return;const t=this.x();typeof t=="function"&&(this.u=t)}finally{e()}},ss.prototype.S=function(){if(1&this.f)throw new Error("Cycle detected");this.f|=1,this.f&=-9,Ub(this),Bb(this),mi++;const e=Ue;return Ue=this,j$.bind(this,e)},ss.prototype.N=function(){2&this.f||(this.f|=2,this.o=bo,bo=this)},ss.prototype.d=function(){this.f|=8,1&this.f||_h(this)},ss.prototype.dispose=function(){this.d()};function O$(e){return(typeof e.nodes=="function"?e.nodes():e.nodes)||[]}Vj("format",{parse:e=>typeof e=="number"?e:0});function nt(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function qb(e,t){if(e&&t&&!Array.isArray(t)&&typeof e=="object"&&typeof t=="object"){const n=e,r=t;for(const i in r)n[i]=qb(n[i],r[i]);return e}return t}const wh=0,kh=1,Vb=2,Sh=3,Wu=4,os=5,Nh=6,wo=7;function Eh(e){return e.id===wh}function Kb(e){return e.id===Vb}function $$(e){return function(t){return t.id===kh}(e)||nt(305,String(e.id),String(kh)),Object.assign(e,{id:Vb})}const P$=new Set;class A${constructor(t,n){ee(this,"builder");ee(this,"configs");ee(this,"_dependency");ee(this,"_peerNameSet");ee(this,"extension");ee(this,"state");ee(this,"_signal");this.builder=t,this.extension=n,this.configs=new Set,this.state={id:wh}}mergeConfigs(){let t=this.extension.config||{};const n=this.extension.mergeConfig?this.extension.mergeConfig.bind(this.extension):f$;for(const r of this.configs)t=n(t,r);return t}init(t){const n=this.state;Kb(n)||nt(306,String(n.id));const r={getDependency:this.getInitDependency.bind(this),getDirectDependentNames:this.getDirectDependentNames.bind(this),getPeer:this.getInitPeer.bind(this),getPeerNameSet:this.getPeerNameSet.bind(this)},i={...r,getDependency:this.getDependency.bind(this),getInitResult:this.getInitResult.bind(this),getPeer:this.getPeer.bind(this)},a=function(o,l,u){return Object.assign(o,{config:l,id:Sh,registerState:u})}(n,this.mergeConfigs(),r);let s;this.state=a,this.extension.init&&(s=this.extension.init(t,a.config,r)),this.state=function(o,l,u){return Object.assign(o,{id:Wu,initResult:l,registerState:u})}(a,s,i)}build(t){const n=this.state;let r;n.id!==Wu&&nt(307,String(n.id),String(os)),this.extension.build&&(r=this.extension.build(t,n.config,n.registerState));const i={...n.registerState,getOutput:()=>r,getSignal:this.getSignal.bind(this)};this.state=function(a,s,o){return Object.assign(a,{id:os,output:s,registerState:o})}(n,r,i)}register(t,n){this._signal=n;const r=this.state;r.id!==os&&nt(308,String(r.id),String(os));const i=this.extension.register&&this.extension.register(t,r.config,r.registerState);return this.state=function(a){return Object.assign(a,{id:Nh})}(r),()=>{const a=this.state;a.id!==wo&&nt(309,String(r.id),String(wo)),this.state=function(s){return Object.assign(s,{id:os})}(a),i&&i()}}afterRegistration(t){const n=this.state;let r;return n.id!==Nh&&nt(310,String(n.id),String(Nh)),this.extension.afterRegistration&&(r=this.extension.afterRegistration(t,n.config,n.registerState)),this.state=function(i){return Object.assign(i,{id:wo})}(n),r}getSignal(){return this._signal===void 0&&nt(311),this._signal}getInitResult(){this.extension.init===void 0&&nt(312,this.extension.name);const t=this.state;return function(n){return n.id>=Wu}(t)||nt(313,String(t.id),String(Wu)),t.initResult}getInitPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionInitDependency():void 0}getExtensionInitDependency(){const t=this.state;return function(n){return n.id>=Sh}(t)||nt(314,String(t.id),String(Sh)),{config:t.config}}getPeer(t){const n=this.builder.extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}getInitDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&nt(315,this.extension.name,t.name),n.getExtensionInitDependency()}getDependency(t){const n=this.builder.getExtensionRep(t);return n===void 0&&nt(315,this.extension.name,t.name),n.getExtensionDependency()}getState(){const t=this.state;return function(n){return n.id>=wo}(t)||nt(316,String(t.id),String(wo)),t}getDirectDependentNames(){return this.builder.incomingEdges.get(this.extension.name)||P$}getPeerNameSet(){let t=this._peerNameSet;return t||(t=new Set((this.extension.peerDependencies||[]).map(([n])=>n)),this._peerNameSet=t),t}getExtensionDependency(){if(!this._dependency){const t=this.state;(function(n){return n.id>=os})(t)||nt(317,this.extension.name),this._dependency={config:t.config,init:t.initResult,output:t.output}}return this._dependency}}const Yb={tag:Zi};function L$(){const e=lt();e.isEmpty()&&e.append(tt())}const D$={config:{setOptions:Yb,updateOptions:Yb},init:({$initialEditorState:e=L$})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:n},r){const i=r.getInitResult();if(!i.initialized){i.initialized=!0;const{$initialEditorState:a}=i;if(LO(a))e.setEditorState(a,n);else if(typeof a=="function")e.update(()=>{a(e)},t);else if(a&&(typeof a=="string"||typeof a=="object")){const s=e.parseEditorState(a);e.setEditorState(s,n)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[Ga,Ur,Ha,Va,Xa]},Gb=Symbol.for("@lexical/extension/LexicalBuilder");function Xb(){}function I$(e){throw e}function Uu(e){return Array.isArray(e)?e:[e]}const Th="0.41.0+prod.esm";let Jb=class Ud{constructor(t){ee(this,"roots");ee(this,"extensionNameMap");ee(this,"outgoingConfigEdges");ee(this,"incomingEdges");ee(this,"conflicts");ee(this,"_sortedExtensionReps");ee(this,"PACKAGE_VERSION");this.outgoingConfigEdges=new Map,this.incomingEdges=new Map,this.extensionNameMap=new Map,this.conflicts=new Map,this.PACKAGE_VERSION=Th,this.roots=t;for(const n of t)this.addExtension(n)}static fromExtensions(t){const n=[Uu(D$)];for(const r of t)n.push(Uu(r));return new Ud(n)}static maybeFromEditor(t){const n=t[Gb];return n&&(n.PACKAGE_VERSION!==Th&&nt(292,n.PACKAGE_VERSION,Th),n instanceof Ud||nt(293)),n}static fromEditor(t){const n=Ud.maybeFromEditor(t);return n===void 0&&nt(294),n}constructEditor(){const{$initialEditorState:t,onError:n,...r}=this.buildCreateEditorArgs(),i=Object.assign(Bx({...r,...n?{onError:a=>{n(a,i)}}:{}}),{[Gb]:this});for(const a of this.sortedExtensionReps())a.build(i);return i}buildEditor(){let t=Xb;function n(){try{t()}finally{t=Xb}}const r=Object.assign(this.constructEditor(),{dispose:n,[Symbol.dispose]:n});return t=kr(this.registerEditor(r),()=>r.setRootElement(null)),r}hasExtensionByName(t){return this.extensionNameMap.has(t)}getExtensionRep(t){const n=this.extensionNameMap.get(t.name);if(n)return n.extension!==t&&nt(295,t.name),n}addEdge(t,n,r){const i=this.outgoingConfigEdges.get(t);i?i.set(n,r):this.outgoingConfigEdges.set(t,new Map([[n,r]]));const a=this.incomingEdges.get(n);a?a.add(t):this.incomingEdges.set(n,new Set([t]))}addExtension(t){this._sortedExtensionReps!==void 0&&nt(296);const n=Uu(t),[r]=n;typeof r.name!="string"&&nt(297,typeof r.name);let i=this.extensionNameMap.get(r.name);if(i!==void 0&&i.extension!==r&&nt(298,r.name),!i){i=new A$(this,r),this.extensionNameMap.set(r.name,i);const a=this.conflicts.get(r.name);typeof a=="string"&&nt(299,r.name,a);for(const s of r.conflictsWith||[])this.extensionNameMap.has(s)&&nt(299,r.name,s),this.conflicts.set(s,r.name);for(const s of r.dependencies||[]){const o=Uu(s);this.addEdge(r.name,o[0].name,o.slice(1)),this.addExtension(o)}for(const[s,o]of r.peerDependencies||[])this.addEdge(r.name,s,o?[o]:[])}}sortedExtensionReps(){if(this._sortedExtensionReps)return this._sortedExtensionReps;const t=[],n=(r,i)=>{let a=r.state;if(Kb(a))return;const s=r.extension.name;var o;Eh(a)||nt(300,s,i||"[unknown]"),Eh(o=a)||nt(304,String(o.id),String(wh)),a=Object.assign(o,{id:kh}),r.state=a;const l=this.outgoingConfigEdges.get(s);if(l)for(const u of l.keys()){const c=this.extensionNameMap.get(u);c&&n(c,s)}a=$$(a),r.state=a,t.push(r)};for(const r of this.extensionNameMap.values())Eh(r.state)&&n(r);for(const r of t)for(const[i,a]of this.outgoingConfigEdges.get(r.extension.name)||[])if(a.length>0){const s=this.extensionNameMap.get(i);if(s)for(const o of a)s.configs.add(o)}for(const[r,...i]of this.roots)if(i.length>0){const a=this.extensionNameMap.get(r.name);a===void 0&&nt(301,r.name);for(const s of i)a.configs.add(s)}return this._sortedExtensionReps=t,this._sortedExtensionReps}registerEditor(t){const n=this.sortedExtensionReps(),r=new AbortController,i=[()=>r.abort()],a=r.signal;for(const s of n){const o=s.register(t,a);o&&i.push(o)}for(const s of n){const o=s.afterRegistration(t);o&&i.push(o)}return kr(...i)}buildCreateEditorArgs(){const t={},n=new Set,r=new Map,i=new Map,a={},s={},o=this.sortedExtensionReps();for(const c of o){const{extension:d}=c;if(d.onError!==void 0&&(t.onError=d.onError),d.disableEvents!==void 0&&(t.disableEvents=d.disableEvents),d.parentEditor!==void 0&&(t.parentEditor=d.parentEditor),d.editable!==void 0&&(t.editable=d.editable),d.namespace!==void 0&&(t.namespace=d.namespace),d.$initialEditorState!==void 0&&(t.$initialEditorState=d.$initialEditorState),d.nodes)for(const f of O$(d)){if(typeof f!="function"){const g=r.get(f.replace);g&&nt(302,d.name,f.replace.name,g.extension.name),r.set(f.replace,c)}n.add(f)}if(d.html){if(d.html.export)for(const[f,g]of d.html.export.entries())i.set(f,g);d.html.import&&Object.assign(a,d.html.import)}d.theme&&qb(s,d.theme)}Object.keys(s).length>0&&(t.theme=s),n.size&&(t.nodes=[...n]);const l=Object.keys(a).length>0,u=i.size>0;(l||u)&&(t.html={},l&&(t.html.import=a),u&&(t.html.export=i));for(const c of o)c.init(t);return t.onError||(t.onError=I$),t}};function F$(e,t){const n=Jb.fromEditor(e).extensionNameMap.get(t);return n?n.getExtensionDependency():void 0}const z$={name:"@lexical/react/ReactProvider"};function R$(){return lt().getTextContent()}function B$(e,t=!0){if(e)return!1;let n=R$();return t&&(n=n.trim()),n===""}function W$(e){if(!B$(e,!1))return!1;const t=lt().getChildren(),n=t.length;if(n>1)return!1;for(let r=0;r<n;r++){const i=t[r];if(Re(i))return!1;if(Q(i)){if(!Vf(i)||i.__indent!==0)return!1;const a=i.getChildren(),s=a.length;for(let o=0;o<s;o++){const l=a[r];if(!ce(l))return!1}}}return!0}function Zb(e){return()=>W$(e)}function U$(e){const t=window.location.origin,n=r=>{if(r.origin!==t)return;const i=e.getRootElement();if(document.activeElement!==i)return;const a=r.data;if(typeof a=="string"){let s;try{s=JSON.parse(a)}catch{return}if(s&&s.protocol==="nuanria_messaging"&&s.type==="request"){const o=s.payload;if(o&&o.functionId==="makeChanges"){const l=o.args;if(l){const[u,c,d,f,g]=l;e.update(()=>{const p=de();if(ie(p)){const m=p.anchor;let v=m.getNode(),x=0,y=0;if(ce(v)&&u>=0&&c>=0&&(x=u,y=u+c,p.setTextNodeRange(v,x,v,y)),x===y&&d===""||(p.insertRawText(d),v=m.getNode()),ce(v)){x=f,y=f+g;const b=v.getTextContentSize();x=x>b?b:x,y=y>b?b:y,p.setTextNodeRange(v,x,v,y)}r.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",n,!0),()=>{window.removeEventListener("message",n,!0)}}function Ch(e,t){const n=qx(t)?t.body.childNodes:t.childNodes;let r=[];const i=[];for(const a of n)if(!t1.has(a.nodeName)){const s=n1(a,e,i,!1);s!==null&&(r=r.concat(s))}return function(a){for(const s of a)s.getNextSibling()instanceof qf&&s.insertAfter(Wr());for(const s of a){const o=s.getChildren();for(const l of o)s.insertBefore(l);s.remove()}}(i),r}function Qb(e,t){if(typeof document>"u"||typeof window>"u"&&global.window===void 0)throw new Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");const n=document.createElement("div"),r=lt().getChildren();for(let i=0;i<r.length;i++)e1(e,r[i],n,t);return n.innerHTML}function e1(e,t,n,r=null){let i=r===null||t.isSelected(r);const a=Q(t)&&t.excludeFromCopy("html");let s=t;r!==null&&ce(t)&&(s=Mb(r,t,"clone"));const o=Q(s)?s.getChildren():[],l=Gf(e,s.getType());let u;u=l&&l.exportDOM!==void 0?l.exportDOM(e,s):s.exportDOM(e);const{element:c,after:d}=u;if(!c)return!1;const f=document.createDocumentFragment();for(let g=0;g<o.length;g++){const p=o[g],m=e1(e,p,f,r);!i&&Q(t)&&m&&t.extractWithChild(p,r,"html")&&(i=!0)}if(i&&!a){if((yt(c)||uh(c))&&c.append(f),n.append(c),d){const g=d.call(s,c);g&&(uh(c)?c.replaceChildren(g):c.replaceWith(g))}}else n.append(f);return i}const t1=new Set(["STYLE","SCRIPT"]);function n1(e,t,n,r,i=new Map,a){let s=[];if(t1.has(e.nodeName))return s;let o=null;const l=function(p,m){const{nodeName:v}=p,x=m._htmlConversions.get(v.toLowerCase());let y=null;if(x!==void 0)for(const b of x){const k=b(p);k!==null&&(y===null||(y.priority||0)<=(k.priority||0))&&(y=k)}return y!==null?y.conversion:null}(e,t),u=l?l(e):null;let c=null;if(u!==null){c=u.after;const p=u.node;if(o=Array.isArray(p)?p[p.length-1]:p,o!==null){for(const[,m]of i)if(o=m(o,a),!o)break;o&&s.push(...Array.isArray(p)?p:[o])}u.forChild!=null&&i.set(e.nodeName,u.forChild)}const d=e.childNodes;let f=[];const g=(o==null||!fn(o))&&(o!=null&&Ff(o)||r);for(let p=0;p<d.length;p++)f.push(...n1(d[p],t,n,g,new Map(i),o));return c!=null&&(f=c(f)),Pu(e)&&(f=H$(e,f,g?()=>{const p=new qf;return n.push(p),p}:tt)),o==null?f.length>0?s=s.concat(f):Pu(e)&&function(p){return p.nextSibling==null||p.previousSibling==null?!1:ch(p.nextSibling)&&ch(p.previousSibling)}(e)&&(s=s.concat(Wr())):Q(o)&&o.append(...f),s}function H$(e,t,n){const r=e.style.textAlign,i=[];let a=[];for(let s=0;s<t.length;s++){const o=t[s];if(Ff(o))r&&!o.getFormat()&&o.setFormat(r),i.push(o);else if(a.push(o),s===t.length-1||s<t.length-1&&Ff(t[s+1])){const l=n();l.setFormat(r),l.append(...a),i.push(l),a=[]}}return i}function Hu(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function q$(e,t=de()){return t==null&&Hu(166),ie(t)&&t.isCollapsed()||t.getNodes().length===0?"":Qb(e,t)}function V$(e,t=de()){return t==null&&Hu(166),ie(t)&&t.isCollapsed()||t.getNodes().length===0?null:JSON.stringify(K$(e,t))}function r1(e,t,n){const r=e.getData("application/x-lexical-editor");if(r)try{const o=JSON.parse(r);if(o.namespace===n._config.namespace&&Array.isArray(o.nodes))return i1(n,Y$(o.nodes),t)}catch(o){console.error(o)}const i=e.getData("text/html"),a=e.getData("text/plain");if(i&&a!==i)try{const o=new DOMParser().parseFromString(function(l){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:u=>u}).createHTML(l):l}(i),"text/html");return i1(n,Ch(n,o),t)}catch(o){console.error(o)}const s=a||e.getData("text/uri-list");if(s!=null)if(ie(t)){const o=s.split(/(\r?\n|\t)/);o[o.length-1]===""&&o.pop();for(let l=0;l<o.length;l++){const u=de();if(ie(u)){const c=o[l];c===`
281
+ `||c===`\r
282
+ `?u.insertParagraph():c===" "?u.insertNodes([Ka()]):u.insertText(c)}}}else t.insertRawText(s)}function i1(e,t,n){e.dispatchCommand(eO,{nodes:t,selection:n})||(n.insertNodes(t),function(r){if(ie(r)&&r.isCollapsed()){const i=r.anchor;let a=null;const s=wr(i,"previous");if(s)if(br(s))a=s.origin;else{const o=fi(s,Pn(lt(),"next").getFlipped());for(const l of o){if(ce(l.origin)){a=l.origin;break}if(Q(l.origin)&&!l.origin.isInline())break}}if(a&&ce(a)){const o=a.getFormat(),l=a.getStyle();r.format===o&&r.style===l||(r.format=o,r.style=l,r.dirty=!0)}}}(n))}function a1(e,t,n,r=[]){let i=t===null||n.isSelected(t);const a=Q(n)&&n.excludeFromCopy("html");let s=n;t!==null&&ce(s)&&(s=Mb(t,s,"clone"));const o=Q(s)?s.getChildren():[],l=function(u){const c=u.exportJSON(),d=u.constructor;if(c.type!==d.getType()&&Hu(58,d.name),Q(u)){const f=c.children;Array.isArray(f)||Hu(59,d.name)}return c}(s);ce(s)&&s.getTextContentSize()===0&&(i=!1);for(let u=0;u<o.length;u++){const c=o[u],d=a1(e,t,c,l.children);!i&&Q(n)&&d&&n.extractWithChild(c,t,"clone")&&(i=!0)}if(i&&!a)r.push(l);else if(Array.isArray(l.children))for(let u=0;u<l.children.length;u++){const c=l.children[u];r.push(c)}return i}function K$(e,t){const n=[],r=lt().getChildren();for(let i=0;i<r.length;i++)a1(e,t,r[i],n);return{namespace:e._config.namespace,nodes:n}}function Y$(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n],i=AO(r);ce(i)&&x$(i),t.push(i)}return t}let ls=null;async function s1(e,t,n){if(ls!==null)return!1;if(t!==null)return new Promise((u,c)=>{e.update(()=>{u(o1(e,t,n))})});const r=e.getRootElement(),i=e._window||window,a=i.document,s=On(i);if(r===null||s===null)return!1;const o=a.createElement("span");o.style.cssText="position: fixed; top: -1000px;",o.append(a.createTextNode("#")),r.append(o);const l=new Range;return l.setStart(o,0),l.setEnd(o,1),s.removeAllRanges(),s.addRange(l),new Promise((u,c)=>{const d=e.registerCommand(hu,f=>(gi(f,ClipboardEvent)&&(d(),ls!==null&&(i.clearTimeout(ls),ls=null),u(o1(e,f,n))),!0),IO);ls=i.setTimeout(()=>{d(),ls=null,u(!1)},50),a.execCommand("copy"),o.remove()})}function o1(e,t,n){if(n===void 0){const i=On(e._window),a=de();if(!a||a.isCollapsed()||!i)return!1;const s=i.anchorNode,o=i.focusNode;if(s!==null&&o!==null&&!go(e,s,o))return!1;n=G$(a)}t.preventDefault();const r=t.clipboardData;return r!==null&&(X$(r,n),!0)}const l1=[["text/html",q$],["application/x-lexical-editor",V$]];function G$(e=de()){const t={"text/plain":e?e.getTextContent():""};if(e){const n=Au();for(const[r,i]of l1){const a=i(n,e);a!==null&&(t[r]=a)}}return t}function X$(e,t){for(const[n]of l1)t[n]===void 0&&e.setData(n,"");for(const n in t){const r=t[n];r!==void 0&&e.setData(n,r)}}function u1(e,t){if(document.caretRangeFromPoint!==void 0){const n=document.caretRangeFromPoint(e,t);return n===null?null:{node:n.startContainer,offset:n.startOffset}}if(document.caretPositionFromPoint!=="undefined"){const n=document.caretPositionFromPoint(e,t);return n===null?null:{node:n.offsetNode,offset:n.offset}}return null}const oa=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0,J$=oa&&"documentMode"in document?document.documentMode:null,Z$=oa&&/Mac|iPod|iPhone|iPad/.test(navigator.platform),Q$=!(!oa||!("InputEvent"in window)||J$)&&"getTargetRanges"in new window.InputEvent("input"),e2=oa&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),c1=oa&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,t2=oa&&/^(?=.*Chrome).*/i.test(navigator.userAgent),n2=oa&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&Z$&&!t2,d1=be("DRAG_DROP_PASTE_FILE");class ko extends wn{static getType(){return"quote"}static clone(t){return new ko(t.__key)}createDOM(t){const n=document.createElement("blockquote");return Xr(n,t.theme.quote),n}updateDOM(t,n){return!1}static importDOM(){return{blockquote:t=>({conversion:i2,priority:0})}}exportDOM(t){const{element:n}=super.exportDOM(t);if(yt(n)){this.isEmpty()&&n.append(document.createElement("br"));const r=this.getFormatType();r&&(n.style.textAlign=r);const i=this.getDirection();i&&(n.dir=i)}return{element:n}}static importJSON(t){return Mh().updateFromJSON(t)}insertNewAfter(t,n){const r=tt(),i=this.getDirection();return r.setDirection(i),this.insertAfter(r,n),r}collapseAtStart(){const t=tt();return this.getChildren().forEach(n=>t.append(n)),this.replace(t),!0}canMergeWhenEmpty(){return!0}}function Mh(){return tr(new ko)}function r2(e){return e instanceof ko}class So extends wn{constructor(n,r){super(r);ee(this,"__tag");this.__tag=n}static getType(){return"heading"}static clone(n){return new So(n.__tag,n.__key)}getTag(){return this.__tag}setTag(n){const r=this.getWritable();return this.__tag=n,r}createDOM(n){const r=this.__tag,i=document.createElement(r),a=n.theme.heading;if(a!==void 0){const s=a[r];Xr(i,s)}return i}updateDOM(n,r,i){return n.__tag!==this.__tag}static importDOM(){return{h1:n=>({conversion:us,priority:0}),h2:n=>({conversion:us,priority:0}),h3:n=>({conversion:us,priority:0}),h4:n=>({conversion:us,priority:0}),h5:n=>({conversion:us,priority:0}),h6:n=>({conversion:us,priority:0}),p:n=>{const r=n.firstChild;return r!==null&&f1(r)?{conversion:()=>({node:null}),priority:3}:null},span:n=>f1(n)?{conversion:r=>({node:cs("h1")}),priority:3}:null}}exportDOM(n){const{element:r}=super.exportDOM(n);if(yt(r)){this.isEmpty()&&r.append(document.createElement("br"));const i=this.getFormatType();i&&(r.style.textAlign=i);const a=this.getDirection();a&&(r.dir=a)}return{element:r}}static importJSON(n){return cs(n.tag).updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setTag(n.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(n,r=!0){const i=n?n.anchor.offset:0,a=this.getLastDescendant(),s=!a||n&&n.anchor.key===a.getKey()&&i===a.getTextContentSize()||!n?tt():cs(this.getTag()),o=this.getDirection();if(s.setDirection(o),this.insertAfter(s,r),i===0&&!this.isEmpty()&&n){const l=tt();l.select(),this.replace(l,!0)}return s}collapseAtStart(){const n=this.isEmpty()?tt():cs(this.getTag());return this.getChildren().forEach(r=>n.append(r)),this.replace(n),!0}extractWithChild(){return!0}}function f1(e){return e.nodeName.toLowerCase()==="span"&&e.style.fontSize==="26pt"}function us(e){const t=e.nodeName.toLowerCase();let n=null;return t!=="h1"&&t!=="h2"&&t!=="h3"&&t!=="h4"&&t!=="h5"&&t!=="h6"||(n=cs(t),e.style!==null&&(dh(e,n),n.setFormat(e.style.textAlign))),{node:n}}function i2(e){const t=Mh();return e.style!==null&&(t.setFormat(e.style.textAlign),dh(e,t)),{node:t}}function cs(e="h1"){return tr(new So(e))}function a2(e){return e instanceof So}function qu(e){let t=null;if(gi(e,DragEvent)?t=e.dataTransfer:gi(e,ClipboardEvent)&&(t=e.clipboardData),t===null)return[!1,[],!1];const n=t.types,r=n.includes("Files"),i=n.includes("text/html")||n.includes("text/plain");return[r,Array.from(t.files),i]}function h1(e){const t=Za(e);return Re(t)}function jh(e){for(const t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function s2(e){return kr(e.registerCommand(E0,t=>{const n=de();return!!Kt(n)&&(n.clear(),!0)},Oe),e.registerCommand(Xi,t=>{const n=de();return ie(n)?(n.deleteCharacter(t),!0):!!Kt(n)&&(n.deleteNodes(),!0)},Oe),e.registerCommand(ro,t=>{const n=de();return!!ie(n)&&(n.deleteWord(t),!0)},Oe),e.registerCommand(io,t=>{const n=de();return!!ie(n)&&(n.deleteLine(t),!0)},Oe),e.registerCommand(Ra,t=>{const n=de();if(typeof t=="string")n!==null&&n.insertText(t);else{if(n===null)return!1;const r=t.dataTransfer;if(r!=null)r1(r,n,e);else if(ie(n)){const i=t.data;return i&&n.insertText(i),!0}}return!0},Oe),e.registerCommand(Sf,()=>{const t=de();return!!ie(t)&&(t.removeText(),!0)},Oe),e.registerCommand(_n,t=>{const n=de();return!!ie(n)&&(n.formatText(t),!0)},Oe),e.registerCommand(Ba,t=>{const n=de();if(!ie(n)&&!Kt(n))return!1;const r=n.getNodes();for(const i of r){const a=Rt(i,s=>Q(s)&&!s.isInline());a!==null&&a.setFormat(t)}return!0},Oe),e.registerCommand(za,t=>{const n=de();return!!ie(n)&&(n.insertLineBreak(t),!0)},Oe),e.registerCommand(no,()=>{const t=de();return!!ie(t)&&(t.insertParagraph(),!0)},Oe),e.registerCommand(rO,()=>{const t=Ka(),n=de();return ie(n)&&(t.setFormat(n.format),t.setStyle(n.style)),OO([t]),!0},Oe),e.registerCommand(iO,()=>Ib(t=>{const n=t.getIndent();t.setIndent(n+1)}),Oe),e.registerCommand(B0,()=>Ib(t=>{const n=t.getIndent();n>0&&t.setIndent(Math.max(0,n-1))}),Oe),e.registerCommand(A0,t=>{const n=de();if(Kt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectPrevious(),!0}else if(ie(n)){const r=nh(n.focus,!0);if(!t.shiftKey&&Re(r)&&!r.isIsolated()&&!r.isInline())return r.selectPrevious(),t.preventDefault(),!0}return!1},Oe),e.registerCommand(L0,t=>{const n=de();if(Kt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),r[0].selectNext(0,0),!0}else if(ie(n)){if(function(i){const a=i.focus;return a.key==="root"&&a.offset===lt().getChildrenSize()}(n))return t.preventDefault(),!0;const r=nh(n.focus,!1);if(!t.shiftKey&&Re(r)&&!r.isIsolated()&&!r.isInline())return r.selectNext(),t.preventDefault(),!0}return!1},Oe),e.registerCommand(P0,t=>{const n=de();if(Kt(n)){const r=n.getNodes();if(r.length>0)return t.preventDefault(),Cb(r[0])?r[0].selectNext(0,0):r[0].selectPrevious(),!0}if(!ie(n))return!1;if($b(n,!0)){const r=t.shiftKey;return t.preventDefault(),Ab(n,r,!0),!0}return!1},Oe),e.registerCommand($0,t=>{const n=de();if(Kt(n)){const i=n.getNodes();if(i.length>0)return t.preventDefault(),Cb(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!ie(n))return!1;const r=t.shiftKey;return!!$b(n,!1)&&(t.preventDefault(),Ab(n,r,!1),!0)},Oe),e.registerCommand(I0,t=>{if(h1(t.target))return!1;const n=de();if(ie(n)){if(function(r){if(!r.isCollapsed())return!1;const{anchor:i}=r;if(i.offset!==0)return!1;const a=i.getNode();if(wt(a))return!1;const s=N$(a);return s.getIndent()>0&&(s.is(a)||a.is(s.getFirstDescendant()))}(n))return t.preventDefault(),e.dispatchCommand(B0,void 0);if(c1&&navigator.language==="ko-KR")return!1}else if(!Kt(n))return!1;return t.preventDefault(),e.dispatchCommand(Xi,!0)},Oe),e.registerCommand(z0,t=>{if(h1(t.target))return!1;const n=de();return!(!ie(n)&&!Kt(n))&&(t.preventDefault(),e.dispatchCommand(Xi,!1))},Oe),e.registerCommand(fu,t=>{const n=de();if(!ie(n))return!1;if(jh(n),t!==null){if((c1||e2||n2)&&Q$)return!1;if(t.preventDefault(),t.shiftKey)return e.dispatchCommand(za,!1)}return e.dispatchCommand(no,void 0)},Oe),e.registerCommand(F0,()=>{const t=de();return!!ie(t)&&(e.blur(),!0)},Oe),e.registerCommand(W0,t=>{const[,n]=qu(t);if(n.length>0){const i=u1(t.clientX,t.clientY);if(i!==null){const{offset:a,node:s}=i,o=Za(s);if(o!==null){const l=zf();if(ce(o))l.anchor.set(o.getKey(),a,"text"),l.focus.set(o.getKey(),a,"text");else{const c=o.getParentOrThrow().getKey(),d=o.getIndexWithinParent()+1;l.anchor.set(c,d,"element"),l.focus.set(c,d,"element")}const u=qi(l);Yt(u)}e.dispatchCommand(d1,n)}return t.preventDefault(),!0}const r=de();return!!ie(r)},Oe),e.registerCommand(U0,t=>{const[n]=qu(t),r=de();return!(n&&!ie(r))},Oe),e.registerCommand(H0,t=>{const[n]=qu(t),r=de();if(n&&!ie(r))return!1;const i=u1(t.clientX,t.clientY);if(i!==null){const a=Za(i.node);Re(a)&&t.preventDefault()}return!0},Oe),e.registerCommand(Ef,()=>(WO(),!0),Oe),e.registerCommand(hu,t=>(s1(e,gi(t,ClipboardEvent)?t:null),!0),Oe),e.registerCommand(Nf,t=>(async function(n,r){await s1(r,gi(n,ClipboardEvent)?n:null),r.update(()=>{const i=de();ie(i)?i.removeText():Kt(i)&&i.getNodes().forEach(a=>a.remove())})}(t,e),!0),Oe),e.registerCommand(uu,t=>{const[,n,r]=qu(t);return n.length>0&&!r?(e.dispatchCommand(d1,n),!0):ns(t.target)&&Xf(t.target)?!1:de()!==null&&(function(i,a){i.preventDefault(),a.update(()=>{const s=de(),o=gi(i,InputEvent)||gi(i,KeyboardEvent)?null:i.clipboardData;o!=null&&s!==null&&r1(o,s,a)},{tag:yO})}(t,e),!0)},Oe),e.registerCommand(D0,t=>{const n=de();return ie(n)&&jh(n),!1},Oe),e.registerCommand(R0,t=>{const n=de();return ie(n)&&jh(n),!1},Oe))}function o2(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}const Oh=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function l2({editor:e,ErrorBoundary:t}){return function(n,r){const[i,a]=_.useState(()=>n.getDecorators());return Oh(()=>n.registerDecoratorListener(s=>{xn.flushSync(()=>{a(s)})}),[n]),_.useEffect(()=>{a(n.getDecorators())},[n]),_.useMemo(()=>{const s=[],o=Object.keys(i);for(let l=0;l<o.length;l++){const u=o[l],c=h.jsx(r,{onError:f=>n._onError(f),children:h.jsx(_.Suspense,{fallback:null,children:i[u]})}),d=n.getElementByKey(u);d!==null&&s.push(xn.createPortal(c,d,u))}return s},[r,i,n])}(e,t)}function u2({editor:e,ErrorBoundary:t}){return function(n){const r=Jb.maybeFromEditor(n);if(r&&r.hasExtensionByName(z$.name)){for(const i of["@lexical/plain-text","@lexical/rich-text"])r.hasExtensionByName(i)&&o2(320,i);return!0}return!1}(e)?null:h.jsx(l2,{editor:e,ErrorBoundary:t})}function p1(e){return e.getEditorState().read(Zb(e.isComposing()))}function c2({contentEditable:e,placeholder:t=null,ErrorBoundary:n}){const[r]=Jr();return function(i){Oh(()=>kr(s2(i),U$(i)),[i])}(r),h.jsxs(h.Fragment,{children:[e,h.jsx(d2,{content:t}),h.jsx(u2,{editor:r,ErrorBoundary:n})]})}function d2({content:e}){const[t]=Jr(),n=function(i){const[a,s]=_.useState(()=>p1(i));return Oh(()=>{function o(){const l=p1(i);s(l)}return o(),kr(i.registerUpdateListener(()=>{o()}),i.registerEditableListener(()=>{o()}))},[i]),a}(t),r=y$();return n?typeof e=="function"?e(r):e:null}const g1=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function f2({editor:e,ariaActiveDescendant:t,ariaAutoComplete:n,ariaControls:r,ariaDescribedBy:i,ariaErrorMessage:a,ariaExpanded:s,ariaInvalid:o,ariaLabel:l,ariaLabelledBy:u,ariaMultiline:c,ariaOwns:d,ariaRequired:f,autoCapitalize:g,className:p,id:m,role:v="textbox",spellCheck:x=!0,style:y,tabIndex:b,"data-testid":k,...w},S){const[N,E]=_.useState(e.isEditable()),T=_.useCallback(O=>{O&&O.ownerDocument&&O.ownerDocument.defaultView?e.setRootElement(O):e.setRootElement(null)},[e]),C=_.useMemo(()=>function(...O){return $=>{for(const M of O)typeof M=="function"?M($):M!=null&&(M.current=$)}}(S,T),[T,S]);return g1(()=>(E(e.isEditable()),e.registerEditableListener(O=>{E(O)})),[e]),h.jsx("div",{"aria-activedescendant":N?t:void 0,"aria-autocomplete":N?n:"none","aria-controls":N?r:void 0,"aria-describedby":i,...a!=null?{"aria-errormessage":a}:{},"aria-expanded":N&&v==="combobox"?!!s:void 0,...o!=null?{"aria-invalid":o}:{},"aria-label":l,"aria-labelledby":u,"aria-multiline":c,"aria-owns":N?d:void 0,"aria-readonly":!N||void 0,"aria-required":f,autoCapitalize:g,className:p,contentEditable:N,"data-testid":k,id:m,ref:C,role:v,spellCheck:x,style:y,tabIndex:b,...w})}const h2=_.forwardRef(f2);function m1(e){return e.getEditorState().read(Zb(e.isComposing()))}const p2=_.forwardRef(g2);function g2(e,t){const{placeholder:n,...r}=e,[i]=Jr();return h.jsxs(h.Fragment,{children:[h.jsx(h2,{editor:i,...r,ref:t}),n!=null&&h.jsx(m2,{editor:i,content:n})]})}function m2({content:e,editor:t}){const n=function(s){const[o,l]=_.useState(()=>m1(s));return g1(()=>{function u(){const c=m1(s);l(c)}return u(),kr(s.registerUpdateListener(()=>{u()}),s.registerEditableListener(()=>{u()}))},[s]),o}(t),[r,i]=_.useState(t.isEditable());if(_.useLayoutEffect(()=>(i(t.isEditable()),t.registerEditableListener(s=>{i(s)})),[t]),!n)return null;let a=null;return typeof e=="function"?a=e(r):e!==null&&(a=e),a===null?null:h.jsx("div",{"aria-hidden":!0,children:a})}function v2(e,t,n,r,i){if(e===null||n.size===0&&r.size===0&&!i)return 0;const a=t._selection,s=e._selection;if(i)return 1;if(!(ie(a)&&ie(s)&&s.isCollapsed()&&a.isCollapsed()))return 0;const o=function(x,y,b){const k=x._nodeMap,w=[];for(const S of y){const N=k.get(S);N!==void 0&&w.push(N)}for(const[S,N]of b){if(!N)continue;const E=k.get(S);E===void 0||wt(E)||w.push(E)}return w}(t,n,r);if(o.length===0)return 0;if(o.length>1){const x=t._nodeMap,y=x.get(a.anchor.key),b=x.get(s.anchor.key);return y&&b&&!e._nodeMap.has(y.__key)&&ce(y)&&y.__text.length===1&&a.anchor.offset===1?2:0}const l=o[0],u=e._nodeMap.get(l.__key);if(!ce(u)||!ce(l)||u.__mode!==l.__mode)return 0;const c=u.__text,d=l.__text;if(c===d)return 0;const f=a.anchor,g=s.anchor;if(f.key!==g.key||f.type!=="text")return 0;const p=f.offset,m=g.offset,v=d.length-c.length;return v===1&&m===p-1?2:v===-1&&m===p+1?3:v===-1&&m===p?4:0}function y2(e,t){let n=Date.now(),r=0,i=Date.now(),a=0,s=null;return(o,l,u,c,d,f)=>{const g=Date.now();if(f.has(ax)&&(i=n,a=r,s=o),f.has($f))return r=0,n=g,2;f.has(sx)&&s&&(n=i,r=a,o=s);const p=v2(o,l,c,d,e.isComposing()),m=(()=>{const v=u===null||u.editor===e,x=f.has(vO);if(!x&&v&&f.has(Zi))return 0;if(p===1)return 2;if(o===null)return 1;const y=l._selection;if(!(c.size>0||d.size>0))return y!==null?0:2;const b=typeof t=="number"?t:t.peek();return x===!1&&p!==0&&p===r&&g<n+b&&v||c.size===1&&function(k,w,S){const N=w._nodeMap.get(k),E=S._nodeMap.get(k),T=w._selection,C=S._selection;return!(ie(T)&&ie(C)&&T.anchor.type==="element"&&T.focus.type==="element"&&C.anchor.type==="text"&&C.focus.type==="text"||!ce(N)||!ce(E)||N.__parent!==E.__parent)&&JSON.stringify(w.read(()=>N.exportJSON()))===JSON.stringify(S.read(()=>E.exportJSON()))}(Array.from(c)[0],o,l)?0:1})();return n=g,r=p,m}}function v1(e){e.undoStack=[],e.redoStack=[],e.current=null}function y1(e,t,n){const r=y2(e,n);return kr(e.registerCommand(cu,()=>(function(a,s){const o=s.redoStack,l=s.undoStack;if(l.length!==0){const u=s.current,c=l.pop();u!==null&&(o.push(u),a.dispatchCommand(ao,!0)),l.length===0&&a.dispatchCommand(so,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:$f})}}(e,t),!0),Oe),e.registerCommand(du,()=>(function(a,s){const o=s.redoStack,l=s.undoStack;if(o.length!==0){const u=s.current;u!==null&&(l.push(u),a.dispatchCommand(so,!0));const c=o.pop();o.length===0&&a.dispatchCommand(ao,!1),s.current=c||null,c&&c.editor.setEditorState(c.editorState,{tag:$f})}}(e,t),!0),Oe),e.registerCommand(sO,()=>(v1(t),!1),Oe),e.registerCommand(oO,()=>(v1(t),e.dispatchCommand(ao,!1),e.dispatchCommand(so,!1),!0),Oe),e.registerUpdateListener(({editorState:a,prevEditorState:s,dirtyLeaves:o,dirtyElements:l,tags:u})=>{const c=t.current,d=t.redoStack,f=t.undoStack,g=c===null?null:c.editorState;if(c!==null&&a===g)return;const p=r(s,a,c,o,l,u);if(p===1)d.length!==0&&(t.redoStack=[],e.dispatchCommand(ao,!1)),c!==null&&(f.push({...c}),e.dispatchCommand(so,!0));else if(p===2)return;t.current={editor:e,editorState:a}}))}function x1(){return{current:null,redoStack:[],undoStack:[]}}const $h={build:(e,{delay:t,createInitialHistoryState:n,disabled:r})=>Hb({delay:t,disabled:r,historyState:n(e)}),config:{createInitialHistoryState:x1,delay:300,disabled:typeof window>"u"},name:"@lexical/history/History",register:(e,t,n)=>{const r=n.getOutput();return _o(()=>r.disabled.value?void 0:y1(e,r.historyState.value,r.delay))}};d$($h,{createInitialHistoryState:()=>{throw new Error("SharedHistory did not inherit parent history")},disabled:!0});function x2({delay:e,externalHistoryState:t}){const[n]=Jr();return function(r,i,a=1e3){const s=_.useMemo(()=>i||x1(),[i]);_.useEffect(()=>y1(r,s,a),[a,r,s])}(n,t,e),null}const b2=typeof window<"u"&&window.document!==void 0&&window.document.createElement!==void 0?_.useLayoutEffect:_.useEffect;function _2({ignoreHistoryMergeTagChange:e=!0,ignoreSelectionChange:t=!1,onChange:n}){const[r]=Jr();return b2(()=>{if(n)return r.registerUpdateListener(({editorState:i,dirtyElements:a,dirtyLeaves:s,prevEditorState:o,tags:l})=>{t&&a.size===0&&s.size===0||e&&l.has(Zi)||o.isEmpty()||n(i,r,l)})},[r,e,t,n]),null}function vi(e,...t){const n=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;r.append("code",e);for(const i of t)r.append("v",i);throw n.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${n.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function Ph(e){let t=1,n=e.getParent();for(;n!=null;){if(Be(n)){const r=n.getParent();if(je(r)){t++,n=r.getParent();continue}vi(40)}return t}return t}function Ah(e){let t=e.getParent();je(t)||vi(40);let n=t;for(;n!==null;)n=n.getParent(),je(n)&&(t=n);return t}function b1(e){let t=[];const n=e.getChildren().filter(Be);for(let r=0;r<n.length;r++){const i=n[r],a=i.getFirstChild();je(a)?t=t.concat(b1(a)):t.push(i)}return t}function Sr(e){return Be(e)&&je(e.getFirstChild())}function _1(e){return An().append(e)}function w1(e,t){return Be(e)&&(t.length===0||t.length===1&&e.is(t[0])&&e.getChildrenSize()===0)}function k1(e){const t=de();if(t!==null){let n=t.getNodes();if(ie(t)){const i=t.getStartEndPoints();i===null&&vi(143);const[a]=i,s=a.getNode(),o=s.getParent();if(fn(s)){const l=s.getFirstChild();if(l)n=l.selectStart().getNodes();else{const u=tt();s.append(u),n=u.select().getNodes()}}else if(w1(s,n)){const l=Nn(e);if(fn(o)){s.replace(l);const u=An();Q(s)&&(u.setFormat(s.getFormatType()),u.setIndent(s.getIndent())),l.append(u)}else if(Be(s)){const u=s.getParentOrThrow();la(l,u.getChildren()),u.replace(l)}return}}const r=new Set;for(let i=0;i<n.length;i++){const a=n[i];if(Q(a)&&a.isEmpty()&&!Be(a)&&!r.has(a.getKey())){S1(a,e);continue}let s=Vx(a)?a.getParent():Be(a)&&a.isEmpty()?a:null;for(;s!=null;){const o=s.getKey();if(je(s)){if(!r.has(o)){const l=Nn(e);la(l,s.getChildren()),s.replace(l),r.add(o)}break}{const l=s.getParent();if(fn(l)&&!r.has(o)){r.add(o),S1(s,e);break}s=l}}}}}function la(e,t){e.splice(e.getChildrenSize(),0,t)}function S1(e,t){if(je(e))return e;const n=e.getPreviousSibling(),r=e.getNextSibling(),i=An();let a;if(la(i,e.getChildren()),je(n)&&t===n.getListType())n.append(i),je(r)&&t===r.getListType()&&(la(n,r.getChildren()),r.remove()),a=n;else if(je(r)&&t===r.getListType())r.getFirstChildOrThrow().insertBefore(i),a=r;else{const o=Nn(t);o.append(i),e.replace(o),a=o}i.setFormat(e.getFormatType()),i.setIndent(e.getIndent());const s=de();return ie(s)&&(a.getKey()===s.anchor.key&&s.anchor.set(i.getKey(),s.anchor.offset,"element"),a.getKey()===s.focus.key&&s.focus.set(i.getKey(),s.focus.offset,"element")),e.remove(),a}function Lh(e,t){const n=e.getLastChild(),r=t.getFirstChild();n&&r&&Sr(n)&&Sr(r)&&(Lh(n.getFirstChild(),r.getFirstChild()),r.remove());const i=t.getChildren();i.length>0&&e.append(...i),t.remove()}function w2(){const e=de();if(ie(e)){const t=new Set,n=e.getNodes(),r=e.anchor.getNode();if(w1(r,n))t.add(Ah(r));else for(let i=0;i<n.length;i++){const a=n[i];if(Vx(a)){const s=S$(a,ds);s!=null&&t.add(Ah(s))}}for(const i of t){let a=i;const s=b1(i);for(const o of s){const l=tt().setTextStyle(e.style).setTextFormat(e.format);la(l,o.getChildren()),a.insertAfter(l),a=l,o.__key===e.anchor.key&&hi(e.anchor,Sn(Pn(l,"next"))),o.__key===e.focus.key&&hi(e.focus,Sn(Pn(l,"next"))),o.remove()}i.remove()}}}function N1(e){const t=e.getListType()!=="check";let n=e.getStart();for(const r of e.getChildren())Be(r)&&(r.getValue()!==n&&r.setValue(n),t&&r.getLatest().__checked!=null&&r.setChecked(void 0),je(r.getFirstChild())||n++)}function k2(e){const t=new Set;if(Sr(e)||t.has(e.getKey()))return;const n=e.getParent(),r=e.getNextSibling(),i=e.getPreviousSibling();if(Sr(r)&&Sr(i)){const a=i.getFirstChild();if(je(a)){a.append(e);const s=r.getFirstChild();je(s)&&(la(a,s.getChildren()),r.remove(),t.add(r.getKey()))}}else if(Sr(r)){const a=r.getFirstChild();if(je(a)){const s=a.getFirstChild();s!==null&&s.insertBefore(e)}}else if(Sr(i)){const a=i.getFirstChild();je(a)&&a.append(e)}else if(je(n)){const a=An().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),s=Nn(n.getListType()).setTextFormat(n.getTextFormat()).setTextStyle(n.getTextStyle());a.append(s),s.append(e),i?i.insertAfter(a):r?r.insertBefore(a):n.append(a)}}function S2(e){if(Sr(e))return;const t=e.getParent(),n=t?t.getParent():void 0;if(je(n?n.getParent():void 0)&&Be(n)&&je(t)){const r=t?t.getFirstChild():void 0,i=t?t.getLastChild():void 0;if(e.is(r))n.insertBefore(e),t.isEmpty()&&n.remove();else if(e.is(i))n.insertAfter(e),t.isEmpty()&&n.remove();else{const a=t.getListType(),s=An(),o=Nn(a);s.append(o),e.getPreviousSiblings().forEach(c=>o.append(c));const l=An(),u=Nn(a);l.append(u),la(u,e.getNextSiblings()),n.insertBefore(s),n.insertAfter(l),n.replace(e)}}}function N2(e=!1){const t=de();if(!ie(t)||!t.isCollapsed())return!1;const n=t.anchor.getNode();let r=null;if(Be(n)&&n.getChildrenSize()===0)r=n;else if(ce(n)){const u=n.getParent();Be(u)&&u.getChildren().every(c=>ce(c)&&c.getTextContent().trim()==="")&&(r=u)}if(r===null)return!1;const i=Ah(r),a=r.getParent();je(a)||vi(40);const s=a.getParent();let o;if(fn(s))o=tt(),i.insertAfter(o);else{if(!Be(s))return!1;o=An(),s.insertAfter(o)}o.setTextStyle(t.style).setTextFormat(t.format).select();const l=r.getNextSiblings();if(l.length>0){const u=e?function(d,f){return d.getStart()+f.getIndexWithinParent()}(a,r):1,c=Nn(a.getListType(),u);if(Be(o)){const d=An();d.append(c),o.insertAfter(d)}else o.insertAfter(c);c.append(...l)}return function(u){let c=u;for(;c.getNextSibling()==null&&c.getPreviousSibling()==null;){const d=c.getParent();if(d==null||!Be(d)&&!je(d))break;c=d}c.remove()}(r),!0}class ds extends wn{constructor(n=1,r=void 0,i){super(i);ee(this,"__value");ee(this,"__checked");this.__value=n===void 0?1:n,this.__checked=r}$config(){return this.config("listitem",{$transform:n=>{if(n.__checked==null)return;const r=n.getParent();je(r)&&r.getListType()!=="check"&&n.getChecked()!=null&&n.setChecked(void 0)},extends:wn,importDOM:{li:()=>({conversion:E2,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__value=n.__value,this.__checked=n.__checked}createDOM(n){const r=document.createElement("li");return this.updateListItemDOM(null,r,n),r}updateListItemDOM(n,r,i){(function(o,l,u){const c=l.getParent();!je(c)||c.getListType()!=="check"||je(l.getFirstChild())?(o.removeAttribute("role"),o.removeAttribute("tabIndex"),o.removeAttribute("aria-checked")):(o.setAttribute("role","checkbox"),o.setAttribute("tabIndex","-1"),u&&l.__checked===u.__checked||o.setAttribute("aria-checked",l.getChecked()?"true":"false"))})(r,this,n),r.value=this.__value,function(o,l,u){const c=[],d=[],f=l.list,g=f?f.listitem:void 0;let p;if(f&&f.nested&&(p=f.nested.listitem),g!==void 0&&c.push(...pi(g)),f){const m=u.getParent(),v=je(m)&&m.getListType()==="check",x=u.getChecked();v&&!x||d.push(f.listitemUnchecked),v&&x||d.push(f.listitemChecked),v&&c.push(x?f.listitemChecked:f.listitemUnchecked)}if(p!==void 0){const m=pi(p);u.getChildren().some(v=>je(v))?c.push(...m):d.push(...m)}d.length>0&&yh(o,...d),c.length>0&&Xr(o,...c)}(r,i.theme,this);const a=n?n.__style:"",s=this.__style;a!==s&&(s===""?r.removeAttribute("style"):r.style.cssText=s),function(o,l,u){const c=Nb(l.__textStyle);for(const d in c)o.style.setProperty(`--listitem-marker-${d}`,c[d]);if(u)for(const d in Nb(u.__textStyle))d in c||o.style.removeProperty(`--listitem-marker-${d}`)}(r,this,n)}updateDOM(n,r,i){const a=r;return this.updateListItemDOM(n,a,i),!1}updateFromJSON(n){return super.updateFromJSON(n).setValue(n.value).setChecked(n.checked)}exportDOM(n){const r=this.createDOM(n._config),i=this.getFormatType();i&&(r.style.textAlign=i);const a=this.getDirection();return a&&(r.dir=a),{element:r}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...n){for(let r=0;r<n.length;r++){const i=n[r];if(Q(i)&&this.canMergeWith(i)){const a=i.getChildren();this.append(...a),i.remove()}else super.append(i)}return this}replace(n,r){if(Be(n))return super.replace(n);this.setIndent(0);const i=this.getParentOrThrow();if(!je(i))return n;if(i.__first===this.getKey())i.insertBefore(n);else if(i.__last===this.getKey())i.insertAfter(n);else{const a=Nn(i.getListType());let s=this.getNextSibling();for(;s;){const o=s;s=s.getNextSibling(),a.append(o)}i.insertAfter(n),n.insertAfter(a)}return r&&(Q(n)||vi(139),this.getChildren().forEach(a=>{n.append(a)})),this.remove(),i.getChildrenSize()===0&&i.remove(),n}insertAfter(n,r=!0){const i=this.getParentOrThrow();if(je(i)||vi(39),Be(n))return super.insertAfter(n,r);const a=this.getNextSiblings();if(i.insertAfter(n,r),a.length!==0){const s=Nn(i.getListType());a.forEach(o=>s.append(o)),n.insertAfter(s,r)}return n}remove(n){const r=this.getPreviousSibling(),i=this.getNextSibling();super.remove(n),r&&i&&Sr(r)&&Sr(i)&&(Lh(r.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(n,r=!0){const i=An().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(i,r),i}collapseAtStart(n){const r=tt();this.getChildren().forEach(o=>r.append(o));const i=this.getParentOrThrow(),a=i.getParentOrThrow(),s=Be(a);if(i.getChildrenSize()===1)if(s)i.remove(),a.select();else{i.insertBefore(r),i.remove();const o=n.anchor,l=n.focus,u=r.getKey();o.type==="element"&&o.getNode().is(this)&&o.set(u,o.offset,"element"),l.type==="element"&&l.getNode().is(this)&&l.set(u,l.offset,"element")}else i.insertBefore(r),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(n){const r=this.getWritable();return r.__value=n,r}getChecked(){const n=this.getLatest();let r;const i=this.getParent();return je(i)&&(r=i.getListType()),r==="check"?!!n.__checked:void 0}setChecked(n){const r=this.getWritable();return r.__checked=n,r}toggleChecked(){const n=this.getWritable();return n.setChecked(!n.__checked)}getIndent(){const n=this.getParent();if(n===null||!this.isAttached())return this.getLatest().__indent;let r=n.getParentOrThrow(),i=0;for(;Be(r);)r=r.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(n){typeof n!="number"&&vi(117),(n=Math.floor(n))>=0||vi(199);let r=this.getIndent();for(;r!==n;)r<n?(k2(this),r++):(S2(this),r--);return this}canInsertAfter(n){return Be(n)}canReplaceWith(n){return Be(n)}canMergeWith(n){return Be(n)||Vf(n)}extractWithChild(n,r){if(!ie(r))return!1;const i=r.anchor.getNode(),a=r.focus.getNode();return this.isParentOf(i)&&this.isParentOf(a)&&this.getTextContent().length===r.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return Nn("bullet")}canMergeWhenEmpty(){return!0}}function E2(e){if(e.classList.contains("task-list-item")){for(const n of e.children)if(n.tagName==="INPUT")return E1(n)}if(e.classList.contains("joplin-checkbox")){for(const n of e.children)if(n.classList.contains("checkbox-wrapper")&&n.children.length>0&&n.children[0].tagName==="INPUT")return E1(n.children[0])}const t=e.getAttribute("aria-checked");return{node:An(t==="true"||t!=="false"&&void 0)}}function E1(e){return e.getAttribute("type")!=="checkbox"?{node:null}:{node:An(e.hasAttribute("checked"))}}function An(e){return tr(new ds(void 0,e))}function Be(e){return e instanceof ds}class No extends wn{constructor(n="number",r=1,i){super(i);ee(this,"__tag");ee(this,"__start");ee(this,"__listType");const a=C2[n]||n;this.__listType=a,this.__tag=a==="number"?"ol":"ul",this.__start=r}$config(){return this.config("list",{$transform:n=>{(function(r){const i=r.getNextSibling();je(i)&&r.getListType()===i.getListType()&&Lh(r,i)})(n),N1(n)},extends:wn,importDOM:{ol:()=>({conversion:C1,priority:0}),ul:()=>({conversion:C1,priority:0})}})}afterCloneFrom(n){super.afterCloneFrom(n),this.__listType=n.__listType,this.__tag=n.__tag,this.__start=n.__start}getTag(){return this.getLatest().__tag}setListType(n){const r=this.getWritable();return r.__listType=n,r.__tag=n==="number"?"ol":"ul",r}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(n){const r=this.getWritable();return r.__start=n,r}createDOM(n,r){const i=this.__tag,a=document.createElement(i);return this.__start!==1&&a.setAttribute("start",String(this.__start)),a.__lexicalListType=this.__listType,T1(a,n.theme,this),a}updateDOM(n,r,i){return n.__tag!==this.__tag||n.__listType!==this.__listType||(T1(r,i.theme,this),n.__start!==this.__start&&r.setAttribute("start",String(this.__start)),!1)}updateFromJSON(n){return super.updateFromJSON(n).setListType(n.listType).setStart(n.start)}exportDOM(n){const r=this.createDOM(n._config,n);return yt(r)&&(this.__start!==1&&r.setAttribute("start",String(this.__start)),this.__listType==="check"&&r.setAttribute("__lexicalListType","check")),{element:r}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(n,r,i){let a=i;for(let s=0;s<i.length;s++){const o=i[s];Be(o)||(a===i&&(a=[...i]),a[s]=An().append(!Q(o)||je(o)||o.isInline()?o:Ot(o.getTextContent())))}return super.splice(n,r,a)}extractWithChild(n){return Be(n)}}function T1(e,t,n){const r=[],i=[],a=t.list;if(a!==void 0){const s=a[`${n.__tag}Depth`]||[],o=Ph(n)-1,l=o%s.length,u=s[l],c=a[n.__tag];let d;const f=a.nested,g=a.checklist;if(f!==void 0&&f.list&&(d=f.list),c!==void 0&&r.push(c),g!==void 0&&n.__listType==="check"&&r.push(g),u!==void 0){r.push(...pi(u));for(let p=0;p<s.length;p++)p!==l&&i.push(n.__tag+p)}if(d!==void 0){const p=pi(d);o>1?r.push(...p):i.push(...p)}}i.length>0&&yh(e,...i),r.length>0&&Xr(e,...r)}function T2(e){const t=[];for(let n=0;n<e.length;n++){const r=e[n];if(Be(r)){t.push(r);const i=r.getChildren();i.length>1&&i.forEach(a=>{je(a)&&t.push(_1(a))})}else t.push(_1(r))}return t}function C1(e){const t=e.nodeName.toLowerCase();let n=null;return t==="ol"?n=Nn("number",e.start):t==="ul"&&(n=function(r){if(r.getAttribute("__lexicallisttype")==="check"||r.classList.contains("contains-task-list")||r.getAttribute("data-is-checklist")==="1")return!0;for(const i of r.childNodes)if(yt(i)&&i.hasAttribute("aria-checked"))return!0;return!1}(e)?Nn("check"):Nn("bullet")),{after:T2,node:n}}const C2={ol:"number",ul:"bullet"};function Nn(e="number",t=1){return tr(new No(e,t))}function je(e){return e instanceof No}const M2=be("UPDATE_LIST_START_COMMAND"),M1=be("INSERT_UNORDERED_LIST_COMMAND"),j1=be("INSERT_ORDERED_LIST_COMMAND"),Dh=be("REMOVE_LIST_COMMAND");function O1(e,t){return kr(e.registerCommand(j1,()=>(k1("number"),!0),xr),e.registerCommand(M2,n=>{const{listNodeKey:r,newStart:i}=n,a=kt(r);return!!je(a)&&(a.getListType()==="number"&&(a.setStart(i),N1(a)),!0)},xr),e.registerCommand(M1,()=>(k1("bullet"),!0),xr),e.registerCommand(Dh,()=>(w2(),!0),xr),e.registerCommand(no,()=>N2(!!(t&&t.restoreNumbering)),xr),e.registerNodeTransform(ds,n=>{const r=n.getFirstChild();if(r){if(ce(r)){const i=r.getStyle(),a=r.getFormat();n.getTextStyle()!==i&&n.setTextStyle(i),n.getTextFormat()!==a&&n.setTextFormat(a)}}else{const i=de();ie(i)&&(i.style!==n.getTextStyle()||i.format!==n.getTextFormat())&&i.isCollapsed()&&n.is(i.anchor.getNode())&&n.setTextStyle(i.style).setTextFormat(i.format)}}),e.registerNodeTransform(Ur,n=>{const r=n.getParent();if(Be(r)&&n.is(r.getFirstChild())){const i=n.getStyle(),a=n.getFormat();i===r.getTextStyle()&&a===r.getTextFormat()||r.setTextStyle(i).setTextFormat(a)}}))}function j2(e){const t=n=>{const r=n.getParent();if(je(n.getFirstChild())||!je(r))return;const i=Rt(n,a=>Be(a)&&je(a.getParent())&&Be(a.getPreviousSibling()));if(i===null&&n.getIndent()>0)n.setIndent(0);else if(Be(i)){const a=i.getPreviousSibling();if(Be(a)){const s=function(l){let u=l,c=u.getFirstChild();for(;je(c);){const d=c.getLastChild();if(!Be(d))break;u=d,c=u.getFirstChild()}return u}(a),o=s.getParent();if(je(o)){const l=Ph(o);l+1<Ph(r)&&n.setIndent(l)}}}};return e.registerNodeTransform(No,n=>{const r=[n];for(;r.length>0;){const i=r.shift();if(je(i)){for(const a of i.getChildren())if(Be(a)){t(a);const s=a.getFirstChild();je(s)&&r.push(s)}}}})}function O2({hasStrictIndent:e=!1,shouldPreserveNumbering:t=!1}){const[n]=Jr();return _.useEffect(()=>{if(!n.hasNodes([No,ds]))throw new Error("ListPlugin: ListNode and/or ListItemNode not registered on editor")},[n]),_.useEffect(()=>kr(O1(n,{restoreNumbering:t}),e?j2(n):()=>{}),[n,e,t]),function(r){_.useEffect(()=>O1(r),[r])}(n),null}const $2=new Set(["http:","https:","mailto:","sms:","tel:"]);let fs=class QT extends wn{constructor(n="",r={},i){super(i);ee(this,"__url");ee(this,"__target");ee(this,"__rel");ee(this,"__title");const{target:a=null,rel:s=null,title:o=null}=r;this.__url=n,this.__target=a,this.__rel=s,this.__title=o}static getType(){return"link"}static clone(n){return new QT(n.__url,{rel:n.__rel,target:n.__target,title:n.__title},n.__key)}createDOM(n){const r=document.createElement("a");return this.updateLinkDOM(null,r,n),Xr(r,n.theme.link),r}updateLinkDOM(n,r,i){if(ub(r)){n&&n.__url===this.__url||(r.href=this.sanitizeUrl(this.__url));for(const a of["target","rel","title"]){const s=`__${a}`,o=this[s];n&&n[s]===o||(o?r[a]=o:r.removeAttribute(a))}}}updateDOM(n,r,i){return this.updateLinkDOM(n,r,i),!1}static importDOM(){return{a:n=>({conversion:A2,priority:1})}}static importJSON(n){return hs().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setURL(n.url).setRel(n.rel||null).setTarget(n.target||null).setTitle(n.title||null)}sanitizeUrl(n){n=D1(n);try{const r=new URL(D1(n));if(!$2.has(r.protocol))return"about:blank"}catch{return n}return n}exportJSON(){return{...super.exportJSON(),rel:this.getRel(),target:this.getTarget(),title:this.getTitle(),url:this.getURL()}}getURL(){return this.getLatest().__url}setURL(n){const r=this.getWritable();return r.__url=n,r}getTarget(){return this.getLatest().__target}setTarget(n){const r=this.getWritable();return r.__target=n,r}getRel(){return this.getLatest().__rel}setRel(n){const r=this.getWritable();return r.__rel=n,r}getTitle(){return this.getLatest().__title}setTitle(n){const r=this.getWritable();return r.__title=n,r}insertNewAfter(n,r=!0){const i=hs(this.__url,{rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}canBeEmpty(){return!1}isInline(){return!0}extractWithChild(n,r,i){if(!ie(r))return!1;const a=r.anchor.getNode(),s=r.focus.getNode();return this.isParentOf(a)&&this.isParentOf(s)&&r.getTextContent().length>0}isEmailURI(){return this.__url.startsWith("mailto:")}isWebSiteURI(){return this.__url.startsWith("https://")||this.__url.startsWith("http://")}};function $1(e){const t=wr(e,"next");return[t,t.getFlipped()]}function P1(e,t){for(const n of t)if(n.origin.isAttached()){const r=Sn(n);return void hi(e,r)}}function P2(e){const t=de();let n=null,r=null;ie(t)&&(n=$1(t.anchor),r=$1(t.focus));for(const i of Pn(e,"next")){const a=i.origin;if(Q(a)&&!a.isInline()){const s=a.getChildren();if(s.length>0){const o=lb(e);o.append(...s),a.append(o)}E$(a,is(i),{$shouldSplit:()=>!1})}}if(e.isEmpty()){const i=e.getParent();e.remove(),i&&i.isEmpty()&&i.remove()}ie(t)&&(P1(t.anchor,n),P1(t.focus,r),qi(t))}function A2(e){let t=null;if(ub(e)){const n=e.textContent;(n!==null&&n!==""||e.children.length>0)&&(t=hs(e.getAttribute("href")||"",{rel:e.getAttribute("rel"),target:e.getAttribute("target"),title:e.getAttribute("title")}))}return{node:t}}function hs(e="",t){return tr(new fs(e,t))}function Nr(e){return e instanceof fs}let Ih=class eC extends fs{constructor(n="",r={},i){super(n,r,i);ee(this,"__isUnlinked");this.__isUnlinked=r.isUnlinked!==void 0&&r.isUnlinked!==null&&r.isUnlinked}static getType(){return"autolink"}static clone(n){return new eC(n.__url,{isUnlinked:n.__isUnlinked,rel:n.__rel,target:n.__target,title:n.__title},n.__key)}getIsUnlinked(){return this.__isUnlinked}setIsUnlinked(n){const r=this.getWritable();return r.__isUnlinked=n,r}createDOM(n){return this.__isUnlinked?document.createElement("span"):super.createDOM(n)}updateDOM(n,r,i){return super.updateDOM(n,r,i)||n.__isUnlinked!==this.__isUnlinked}static importJSON(n){return A1().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setIsUnlinked(n.isUnlinked||!1)}static importDOM(){return null}exportJSON(){return{...super.exportJSON(),isUnlinked:this.__isUnlinked}}insertNewAfter(n,r=!0){const i=A1(this.__url,{isUnlinked:this.__isUnlinked,rel:this.__rel,target:this.__target,title:this.__title});return this.insertAfter(i,r),i}};function A1(e="",t){return tr(new Ih(e,t))}function Eo(e){return e instanceof Ih}const To=be("TOGGLE_LINK_COMMAND");function L1(e,t){if(e.type==="element"){const n=e.getNode();return Q(n)||function(r,...i){const a=new URL("https://lexical.dev/docs/error"),s=new URLSearchParams;s.append("code",r);for(const o of i)s.append("v",o);throw a.search=s.toString(),Error(`Minified Lexical error #${r}; visit ${a.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}(252),n.getChildren()[e.offset+t]||null}return null}function Fh(e,t={}){let n;if(e&&typeof e=="object"){const{url:c,...d}=e;n=c,t={...d,...t}}else n=e;const{target:r,title:i}=t,a=t.rel===void 0?"noreferrer":t.rel,s=de();if(s===null||!ie(s)&&!Kt(s))return;if(Kt(s)){const c=s.getNodes();return c.length===0?void 0:void c.forEach(d=>{if(n===null){const f=Rt(d,g=>!Eo(g)&&Nr(g));f&&(f.insertBefore(d),f.getChildren().length===0&&f.remove())}else{const f=Rt(d,g=>!Eo(g)&&Nr(g));if(f)f.setURL(n),r!==void 0&&f.setTarget(r),a!==void 0&&f.setRel(a);else{const g=hs(n,{rel:a,target:r});d.insertBefore(g),g.append(d)}}})}if(s.isCollapsed()&&n===null)for(const c of s.getNodes()){const d=Rt(c,f=>!Eo(f)&&Nr(f));return void(d!==null&&(d.getChildren().forEach(f=>{d.insertBefore(f)}),d.remove()))}const o=s.extract();if(n===null){const c=new Set;return void o.forEach(d=>{const f=Rt(d,g=>!Eo(g)&&Nr(g));if(f!==null){const g=f.getKey();if(c.has(g))return;(function(p,m){const v=new Set(m.filter(E=>p.isParentOf(E)).map(E=>E.getKey())),x=p.getChildren(),y=E=>v.has(E.getKey())||Q(E)&&m.some(T=>p.isParentOf(T)&&E.isParentOf(T)),b=x.filter(y);if(b.length===x.length)return x.forEach(E=>p.insertBefore(E)),void p.remove();const k=x.findIndex(y),w=x.findLastIndex(y),S=k===0,N=w===x.length-1;if(S)b.forEach(E=>p.insertBefore(E));else if(N)for(let E=b.length-1;E>=0;E--)p.insertAfter(b[E]);else{for(let T=b.length-1;T>=0;T--)p.insertAfter(b[T]);const E=x.slice(w+1);if(E.length>0){const T=hs(p.getURL(),{rel:p.getRel(),target:p.getTarget(),title:p.getTitle()});b[b.length-1].insertAfter(T),E.forEach(C=>T.append(C))}}})(f,o),c.add(g)}})}const l=new Set,u=c=>{l.has(c.getKey())||(l.add(c.getKey()),c.setURL(n),r!==void 0&&c.setTarget(r),a!==void 0&&c.setRel(a),i!==void 0&&c.setTitle(i))};if(o.length===1){const c=o[0],d=Rt(c,Nr);if(d!==null)return u(d)}(function(c){const d=de();if(!ie(d))return c();const f=qi(d),g=f.isBackward(),p=L1(f.anchor,g?-1:0),m=L1(f.focus,g?0:-1);if(c(),p||m){const v=de();if(ie(v)){const x=v.clone();if(p){const y=p.getParent();y&&x.anchor.set(y.getKey(),p.getIndexWithinParent()+(g?1:0),"element")}if(m){const y=m.getParent();y&&x.focus.set(y.getKey(),m.getIndexWithinParent()+(g?0:1),"element")}Yt(qi(x))}}})(()=>{let c=null;for(const d of o){if(!d.isAttached())continue;const f=Rt(d,Nr);if(f){u(f);continue}if(Q(d)){if(!d.isInline())continue;if(Nr(d)){if(!(Eo(d)||c!==null&&c.getParentOrThrow().isParentOf(d))){u(d),c=d;continue}for(const p of d.getChildren())d.insertBefore(p);d.remove();continue}}const g=d.getPreviousSibling();Nr(g)&&g.is(c)?g.append(d):(c=hs(n,{rel:a,target:r,title:i}),d.insertAfter(c),c.append(d))}})}const L2=/^\+?[0-9\s()-]{5,}$/;function D1(e){return e.match(/^[a-z][a-z0-9+.-]*:/i)||e.match(/^[/#.]/)?e:e.includes("@")?`mailto:${e}`:L2.test(e)?`tel:${e}`:`https://${e}`}function D2(e,t){return kr(e.registerNodeTransform(fs,P2),_o(()=>e.registerCommand(To,n=>{const r=t.validateUrl.peek(),i=t.attributes.peek();if(n===null)return Fh(null),!0;if(typeof n=="string")return!(r!==void 0&&!r(n))&&(Fh(n,i),!0);{const{url:a,target:s,rel:o,title:l}=n;return Fh(a,{...i,rel:o,target:s,title:l}),!0}},xr)),_o(()=>{const n=t.validateUrl.value;if(!n)return;const r=t.attributes.value;return e.registerCommand(uu,i=>{const a=de();if(!ie(a)||a.isCollapsed()||!gi(i,ClipboardEvent)||i.clipboardData===null)return!1;const s=i.clipboardData.getData("text");return!!n(s)&&!a.getNodes().some(o=>Q(o))&&(e.dispatchCommand(To,{...r,url:s}),i.preventDefault(),!0)},xr)}))}function I2({validateUrl:e,attributes:t}){const[n]=Jr();return _.useEffect(()=>{if(!n.hasNodes([fs]))throw new Error("LinkPlugin: LinkNode not registered on editor")}),_.useEffect(()=>D2(n,Hb({attributes:t,validateUrl:e})),[n,e,t]),null}const F2=_.createContext(null),zh={didCatch:!1,error:null};class z2 extends _.Component{constructor(t){super(t),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=zh}static getDerivedStateFromError(t){return{didCatch:!0,error:t}}resetErrorBoundary(...t){var r,i;const{error:n}=this.state;n!==null&&((i=(r=this.props).onReset)==null||i.call(r,{args:t,reason:"imperative-api"}),this.setState(zh))}componentDidCatch(t,n){var r,i;(i=(r=this.props).onError)==null||i.call(r,t,n)}componentDidUpdate(t,n){var a,s;const{didCatch:r}=this.state,{resetKeys:i}=this.props;r&&n.error!==null&&R2(t.resetKeys,i)&&((s=(a=this.props).onReset)==null||s.call(a,{next:i,prev:t.resetKeys,reason:"keys"}),this.setState(zh))}render(){const{children:t,fallbackRender:n,FallbackComponent:r,fallback:i}=this.props,{didCatch:a,error:s}=this.state;let o=t;if(a){const l={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")o=n(l);else if(r)o=_.createElement(r,l);else if(i!==void 0)o=i;else throw s}return _.createElement(F2.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},o)}}function R2(e=[],t=[]){return e.length!==t.length||e.some((n,r)=>!Object.is(n,t[r]))}function B2({children:e,onError:t}){return h.jsx(z2,{fallback:h.jsx("div",{style:{border:"1px solid #f00",color:"#f00",padding:"8px"},children:"An error was thrown."}),onError:t,children:e})}var W2={exports:{}};(function(e){var t=typeof window<"u"?window:typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope?self:{};/**
283
+ * Prism: Lightweight, robust, elegant syntax highlighting
284
+ *
285
+ * @license MIT <https://opensource.org/licenses/MIT>
286
+ * @author Lea Verou <https://lea.verou.me>
287
+ * @namespace
288
+ * @public
289
+ */var n=function(r){var i=/(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,a=0,s={},o={manual:r.Prism&&r.Prism.manual,disableWorkerMessageHandler:r.Prism&&r.Prism.disableWorkerMessageHandler,util:{encode:function y(b){return b instanceof l?new l(b.type,y(b.content),b.alias):Array.isArray(b)?b.map(y):b.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(y){return Object.prototype.toString.call(y).slice(8,-1)},objId:function(y){return y.__id||Object.defineProperty(y,"__id",{value:++a}),y.__id},clone:function y(b,k){k=k||{};var w,S;switch(o.util.type(b)){case"Object":if(S=o.util.objId(b),k[S])return k[S];w={},k[S]=w;for(var N in b)b.hasOwnProperty(N)&&(w[N]=y(b[N],k));return w;case"Array":return S=o.util.objId(b),k[S]?k[S]:(w=[],k[S]=w,b.forEach(function(E,T){w[T]=y(E,k)}),w);default:return b}},getLanguage:function(y){for(;y;){var b=i.exec(y.className);if(b)return b[1].toLowerCase();y=y.parentElement}return"none"},setLanguage:function(y,b){y.className=y.className.replace(RegExp(i,"gi"),""),y.classList.add("language-"+b)},currentScript:function(){if(typeof document>"u")return null;if(document.currentScript&&document.currentScript.tagName==="SCRIPT")return document.currentScript;try{throw new Error}catch(w){var y=(/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(w.stack)||[])[1];if(y){var b=document.getElementsByTagName("script");for(var k in b)if(b[k].src==y)return b[k]}return null}},isActive:function(y,b,k){for(var w="no-"+b;y;){var S=y.classList;if(S.contains(b))return!0;if(S.contains(w))return!1;y=y.parentElement}return!!k}},languages:{plain:s,plaintext:s,text:s,txt:s,extend:function(y,b){var k=o.util.clone(o.languages[y]);for(var w in b)k[w]=b[w];return k},insertBefore:function(y,b,k,w){w=w||o.languages;var S=w[y],N={};for(var E in S)if(S.hasOwnProperty(E)){if(E==b)for(var T in k)k.hasOwnProperty(T)&&(N[T]=k[T]);k.hasOwnProperty(E)||(N[E]=S[E])}var C=w[y];return w[y]=N,o.languages.DFS(o.languages,function(O,$){$===C&&O!=y&&(this[O]=N)}),N},DFS:function y(b,k,w,S){S=S||{};var N=o.util.objId;for(var E in b)if(b.hasOwnProperty(E)){k.call(b,E,b[E],w||E);var T=b[E],C=o.util.type(T);C==="Object"&&!S[N(T)]?(S[N(T)]=!0,y(T,k,null,S)):C==="Array"&&!S[N(T)]&&(S[N(T)]=!0,y(T,k,E,S))}}},plugins:{},highlightAll:function(y,b){o.highlightAllUnder(document,y,b)},highlightAllUnder:function(y,b,k){var w={callback:k,container:y,selector:'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'};o.hooks.run("before-highlightall",w),w.elements=Array.prototype.slice.apply(w.container.querySelectorAll(w.selector)),o.hooks.run("before-all-elements-highlight",w);for(var S=0,N;N=w.elements[S++];)o.highlightElement(N,b===!0,w.callback)},highlightElement:function(y,b,k){var w=o.util.getLanguage(y),S=o.languages[w];o.util.setLanguage(y,w);var N=y.parentElement;N&&N.nodeName.toLowerCase()==="pre"&&o.util.setLanguage(N,w);var E=y.textContent,T={element:y,language:w,grammar:S,code:E};function C($){T.highlightedCode=$,o.hooks.run("before-insert",T),T.element.innerHTML=T.highlightedCode,o.hooks.run("after-highlight",T),o.hooks.run("complete",T),k&&k.call(T.element)}if(o.hooks.run("before-sanity-check",T),N=T.element.parentElement,N&&N.nodeName.toLowerCase()==="pre"&&!N.hasAttribute("tabindex")&&N.setAttribute("tabindex","0"),!T.code){o.hooks.run("complete",T),k&&k.call(T.element);return}if(o.hooks.run("before-highlight",T),!T.grammar){C(o.util.encode(T.code));return}if(b&&r.Worker){var O=new Worker(o.filename);O.onmessage=function($){C($.data)},O.postMessage(JSON.stringify({language:T.language,code:T.code,immediateClose:!0}))}else C(o.highlight(T.code,T.grammar,T.language))},highlight:function(y,b,k){var w={code:y,grammar:b,language:k};if(o.hooks.run("before-tokenize",w),!w.grammar)throw new Error('The language "'+w.language+'" has no grammar.');return w.tokens=o.tokenize(w.code,w.grammar),o.hooks.run("after-tokenize",w),l.stringify(o.util.encode(w.tokens),w.language)},tokenize:function(y,b){var k=b.rest;if(k){for(var w in k)b[w]=k[w];delete b.rest}var S=new d;return f(S,S.head,y),c(y,S,b,S.head,0),p(S)},hooks:{all:{},add:function(y,b){var k=o.hooks.all;k[y]=k[y]||[],k[y].push(b)},run:function(y,b){var k=o.hooks.all[y];if(!(!k||!k.length))for(var w=0,S;S=k[w++];)S(b)}},Token:l};r.Prism=o;function l(y,b,k,w){this.type=y,this.content=b,this.alias=k,this.length=(w||"").length|0}l.stringify=function y(b,k){if(typeof b=="string")return b;if(Array.isArray(b)){var w="";return b.forEach(function(C){w+=y(C,k)}),w}var S={type:b.type,content:y(b.content,k),tag:"span",classes:["token",b.type],attributes:{},language:k},N=b.alias;N&&(Array.isArray(N)?Array.prototype.push.apply(S.classes,N):S.classes.push(N)),o.hooks.run("wrap",S);var E="";for(var T in S.attributes)E+=" "+T+'="'+(S.attributes[T]||"").replace(/"/g,"&quot;")+'"';return"<"+S.tag+' class="'+S.classes.join(" ")+'"'+E+">"+S.content+"</"+S.tag+">"};function u(y,b,k,w){y.lastIndex=b;var S=y.exec(k);if(S&&w&&S[1]){var N=S[1].length;S.index+=N,S[0]=S[0].slice(N)}return S}function c(y,b,k,w,S,N){for(var E in k)if(!(!k.hasOwnProperty(E)||!k[E])){var T=k[E];T=Array.isArray(T)?T:[T];for(var C=0;C<T.length;++C){if(N&&N.cause==E+","+C)return;var O=T[C],$=O.inside,M=!!O.lookbehind,j=!!O.greedy,P=O.alias;if(j&&!O.pattern.global){var F=O.pattern.toString().match(/[imsuy]*$/)[0];O.pattern=RegExp(O.pattern.source,F+"g")}for(var B=O.pattern||O,W=w.next,q=S;W!==b.tail&&!(N&&q>=N.reach);q+=W.value.length,W=W.next){var D=W.value;if(b.length>y.length)return;if(!(D instanceof l)){var A=1,U;if(j){if(U=u(B,q,y,M),!U||U.index>=y.length)break;var R=U.index,Y=U.index+U[0].length,G=q;for(G+=W.value.length;R>=G;)W=W.next,G+=W.value.length;if(G-=W.value.length,q=G,W.value instanceof l)continue;for(var J=W;J!==b.tail&&(G<Y||typeof J.value=="string");J=J.next)A++,G+=J.value.length;A--,D=y.slice(q,G),U.index-=q}else if(U=u(B,0,D,M),!U)continue;var R=U.index,K=U[0],Z=D.slice(0,R),z=D.slice(R+K.length),X=q+D.length;N&&X>N.reach&&(N.reach=X);var H=W.prev;Z&&(H=f(b,H,Z),q+=Z.length),g(b,H,A);var I=new l(E,$?o.tokenize(K,$):K,P,K);if(W=f(b,H,I),z&&f(b,W,z),A>1){var ne={cause:E+","+C,reach:X};c(y,b,k,W.prev,q,ne),N&&ne.reach>N.reach&&(N.reach=ne.reach)}}}}}}function d(){var y={value:null,prev:null,next:null},b={value:null,prev:y,next:null};y.next=b,this.head=y,this.tail=b,this.length=0}function f(y,b,k){var w=b.next,S={value:k,prev:b,next:w};return b.next=S,w.prev=S,y.length++,S}function g(y,b,k){for(var w=b.next,S=0;S<k&&w!==y.tail;S++)w=w.next;b.next=w,w.prev=b,y.length-=S}function p(y){for(var b=[],k=y.head.next;k!==y.tail;)b.push(k.value),k=k.next;return b}if(!r.document)return r.addEventListener&&(o.disableWorkerMessageHandler||r.addEventListener("message",function(y){var b=JSON.parse(y.data),k=b.language,w=b.code,S=b.immediateClose;r.postMessage(o.highlight(w,o.languages[k],k)),S&&r.close()},!1)),o;var m=o.util.currentScript();m&&(o.filename=m.src,m.hasAttribute("data-manual")&&(o.manual=!0));function v(){o.manual||o.highlightAll()}if(!o.manual){var x=document.readyState;x==="loading"||x==="interactive"&&m&&m.defer?document.addEventListener("DOMContentLoaded",v):window.requestAnimationFrame?window.requestAnimationFrame(v):window.setTimeout(v,16)}return o}(t);e.exports&&(e.exports=n),typeof Pa<"u"&&(Pa.Prism=n),n.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},n.languages.markup.tag.inside["attr-value"].inside.entity=n.languages.markup.entity,n.languages.markup.doctype.inside["internal-subset"].inside=n.languages.markup,n.hooks.add("wrap",function(r){r.type==="entity"&&(r.attributes.title=r.content.replace(/&amp;/,"&"))}),Object.defineProperty(n.languages.markup.tag,"addInlined",{value:function(i,a){var s={};s["language-"+a]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:n.languages[a]},s.cdata=/^<!\[CDATA\[|\]\]>$/i;var o={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:s}};o["language-"+a]={pattern:/[\s\S]+/,inside:n.languages[a]};var l={};l[i]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return i}),"i"),lookbehind:!0,greedy:!0,inside:o},n.languages.insertBefore("markup","cdata",l)}}),Object.defineProperty(n.languages.markup.tag,"addAttribute",{value:function(r,i){n.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+r+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[i,"language-"+i],inside:n.languages[i]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),n.languages.html=n.languages.markup,n.languages.mathml=n.languages.markup,n.languages.svg=n.languages.markup,n.languages.xml=n.languages.extend("markup",{}),n.languages.ssml=n.languages.xml,n.languages.atom=n.languages.xml,n.languages.rss=n.languages.xml,function(r){var i=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;r.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+i.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+i.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+i.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+i.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:i,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},r.languages.css.atrule.inside.rest=r.languages.css;var a=r.languages.markup;a&&(a.tag.addInlined("style","css"),a.tag.addAttribute("style","css"))}(n),n.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},n.languages.javascript=n.languages.extend("clike",{"class-name":[n.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),n.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,n.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:n.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:n.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:n.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:n.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:n.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),n.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:n.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),n.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),n.languages.markup&&(n.languages.markup.tag.addInlined("script","javascript"),n.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),n.languages.js=n.languages.javascript,function(){if(typeof n>"u"||typeof document>"u")return;Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r="Loading…",i=function(m,v){return"✖ Error "+m+" while fetching file: "+v},a="✖ Error: File does not exist or is empty",s={js:"javascript",py:"python",rb:"ruby",ps1:"powershell",psm1:"powershell",sh:"bash",bat:"batch",h:"c",tex:"latex"},o="data-src-status",l="loading",u="loaded",c="failed",d="pre[data-src]:not(["+o+'="'+u+'"]):not(['+o+'="'+l+'"])';function f(m,v,x){var y=new XMLHttpRequest;y.open("GET",m,!0),y.onreadystatechange=function(){y.readyState==4&&(y.status<400&&y.responseText?v(y.responseText):y.status>=400?x(i(y.status,y.statusText)):x(a))},y.send(null)}function g(m){var v=/^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(m||"");if(v){var x=Number(v[1]),y=v[2],b=v[3];return y?b?[x,Number(b)]:[x,void 0]:[x,x]}}n.hooks.add("before-highlightall",function(m){m.selector+=", "+d}),n.hooks.add("before-sanity-check",function(m){var v=m.element;if(v.matches(d)){m.code="",v.setAttribute(o,l);var x=v.appendChild(document.createElement("CODE"));x.textContent=r;var y=v.getAttribute("data-src"),b=m.language;if(b==="none"){var k=(/\.(\w+)$/.exec(y)||[,"none"])[1];b=s[k]||k}n.util.setLanguage(x,b),n.util.setLanguage(v,b);var w=n.plugins.autoloader;w&&w.loadLanguages(b),f(y,function(S){v.setAttribute(o,u);var N=g(v.getAttribute("data-range"));if(N){var E=S.split(/\r\n?|\n/g),T=N[0],C=N[1]==null?E.length:N[1];T<0&&(T+=E.length),T=Math.max(0,Math.min(T-1,E.length)),C<0&&(C+=E.length),C=Math.max(0,Math.min(C,E.length)),S=E.slice(T,C).join(`
290
+ `),v.hasAttribute("data-start")||v.setAttribute("data-start",String(T+1))}x.textContent=S,n.highlightElement(x)},function(S){v.setAttribute(o,c),x.textContent=S})}}),n.plugins.fileHighlight={highlight:function(v){for(var x=(v||document).querySelectorAll(d),y=0,b;b=x[y++];)n.highlightElement(b)}};var p=!1;n.fileHighlight=function(){p||(console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."),p=!0),n.plugins.fileHighlight.highlight.apply(this,arguments)}}()})(W2),Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|trait)\s+|\bcatch\s+\()[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:break|catch|continue|do|else|finally|for|function|if|in|instanceof|new|null|return|throw|try|while)\b/,boolean:/\b(?:false|true)\b/,function:/\b\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,punctuation:/[{}[\];(),.:]/},Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,lookbehind:!0}],keyword:[{pattern:/((?:^|\})\s*)catch\b/,lookbehind:!0},{pattern:/(^|[^.]|\.\.\.\s*)\b(?:as|assert(?=\s*\{)|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally(?=\s*(?:\{|$))|for|from(?=\s*(?:['"]|$))|function|(?:get|set)(?=\s*(?:[#\[$\w\xA0-\uFFFF]|$))|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/,lookbehind:!0}],function:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/,number:{pattern:RegExp(/(^|[^\w$])/.source+"(?:"+(/NaN|Infinity/.source+"|"+/0[bB][01]+(?:_[01]+)*n?/.source+"|"+/0[oO][0-7]+(?:_[0-7]+)*n?/.source+"|"+/0[xX][\dA-Fa-f]+(?:_[\dA-Fa-f]+)*n?/.source+"|"+/\d+(?:_\d+)*n/.source+"|"+/(?:\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\.\d+(?:_\d+)*)(?:[Ee][+-]?\d+(?:_\d+)*)?/.source)+")"+/(?![\w$])/.source),lookbehind:!0},operator:/--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:RegExp(/((?:^|[^$\w\xA0-\uFFFF."'\])\s]|\b(?:return|yield))\s*)/.source+/\//.source+"(?:"+/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}/.source+"|"+/(?:\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.|\[(?:[^[\]\\\r\n]|\\.)*\])*\])*\]|\\.|[^/\\\[\r\n])+\/[dgimyus]{0,7}v[dgimyus]{0,7}/.source+")"+/(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/.source),lookbehind:!0,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:Prism.languages.regex},"regex-delimiter":/^\/|\/$/,"regex-flags":/^[a-z]+$/}},"function-variable":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/,alias:"function"},parameter:[{pattern:/(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,lookbehind:!0,inside:Prism.languages.javascript},{pattern:/((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,lookbehind:!0,inside:Prism.languages.javascript}],constant:/\b[A-Z](?:[A-Z_]|\dx?)*\b/}),Prism.languages.insertBefore("javascript","string",{hashbang:{pattern:/^#!.*/,greedy:!0,alias:"comment"},"template-string":{pattern:/`(?:\\[\s\S]|\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}|(?!\$\{)[^\\`])*`/,greedy:!0,inside:{"template-punctuation":{pattern:/^`|`$/,alias:"string"},interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$\{(?:[^{}]|\{(?:[^{}]|\{[^}]*\})*\})+\}/,lookbehind:!0,inside:{"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}},"string-property":{pattern:/((?:^|[,{])[ \t]*)(["'])(?:\\(?:\r\n|[\s\S])|(?!\2)[^\\\r\n])*\2(?=\s*:)/m,lookbehind:!0,greedy:!0,alias:"property"}}),Prism.languages.insertBefore("javascript","operator",{"literal-property":{pattern:/((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,lookbehind:!0,alias:"property"}}),Prism.languages.markup&&(Prism.languages.markup.tag.addInlined("script","javascript"),Prism.languages.markup.tag.addAttribute(/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,"javascript")),Prism.languages.js=Prism.languages.javascript,Prism.languages.markup={comment:{pattern:/<!--(?:(?!<!--)[\s\S])*?-->/,greedy:!0},prolog:{pattern:/<\?[\s\S]+?\?>/,greedy:!0},doctype:{pattern:/<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i,greedy:!0,inside:{"internal-subset":{pattern:/(^[^\[]*\[)[\s\S]+(?=\]>$)/,lookbehind:!0,greedy:!0,inside:null},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},punctuation:/^<!|>$|[[\]]/,"doctype-tag":/^DOCTYPE/i,name:/[^\s<>'"]+/}},cdata:{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,greedy:!0},tag:{pattern:/<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/,greedy:!0,inside:{tag:{pattern:/^<\/?[^\s>\/]+/,inside:{punctuation:/^<\/?/,namespace:/^[^\s>\/:]+:/}},"special-attr":[],"attr-value":{pattern:/=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/,inside:{punctuation:[{pattern:/^=/,alias:"attr-equals"},{pattern:/^(\s*)["']|["']$/,lookbehind:!0}]}},punctuation:/\/?>/,"attr-name":{pattern:/[^\s>\/]+/,inside:{namespace:/^[^\s>\/:]+:/}}}},entity:[{pattern:/&[\da-z]{1,8};/i,alias:"named-entity"},/&#x?[\da-f]{1,8};/i]},Prism.languages.markup.tag.inside["attr-value"].inside.entity=Prism.languages.markup.entity,Prism.languages.markup.doctype.inside["internal-subset"].inside=Prism.languages.markup,Prism.hooks.add("wrap",function(e){e.type==="entity"&&(e.attributes.title=e.content.replace(/&amp;/,"&"))}),Object.defineProperty(Prism.languages.markup.tag,"addInlined",{value:function(t,n){var r={};r["language-"+n]={pattern:/(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,lookbehind:!0,inside:Prism.languages[n]},r.cdata=/^<!\[CDATA\[|\]\]>$/i;var i={"included-cdata":{pattern:/<!\[CDATA\[[\s\S]*?\]\]>/i,inside:r}};i["language-"+n]={pattern:/[\s\S]+/,inside:Prism.languages[n]};var a={};a[t]={pattern:RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g,function(){return t}),"i"),lookbehind:!0,greedy:!0,inside:i},Prism.languages.insertBefore("markup","cdata",a)}}),Object.defineProperty(Prism.languages.markup.tag,"addAttribute",{value:function(e,t){Prism.languages.markup.tag.inside["special-attr"].push({pattern:RegExp(/(^|["'\s])/.source+"(?:"+e+")"+/\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,"i"),lookbehind:!0,inside:{"attr-name":/^[^\s=]+/,"attr-value":{pattern:/=[\s\S]+/,inside:{value:{pattern:/(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,lookbehind:!0,alias:[t,"language-"+t],inside:Prism.languages[t]},punctuation:[{pattern:/^=/,alias:"attr-equals"},/"|'/]}}}})}}),Prism.languages.html=Prism.languages.markup,Prism.languages.mathml=Prism.languages.markup,Prism.languages.svg=Prism.languages.markup,Prism.languages.xml=Prism.languages.extend("markup",{}),Prism.languages.ssml=Prism.languages.xml,Prism.languages.atom=Prism.languages.xml,Prism.languages.rss=Prism.languages.xml,function(e){var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(c){return c=c.replace(/<inner>/g,function(){return t}),RegExp(/((?:^|[^\\])(?:\\{2})*)/.source+"(?:"+c+")")}var r=/(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source,i=/\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g,function(){return r}),a=/\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;e.languages.markdown=e.languages.extend("markup",{}),e.languages.insertBefore("markdown","prolog",{"front-matter-block":{pattern:/(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,lookbehind:!0,greedy:!0,inside:{punctuation:/^---|---$/,"front-matter":{pattern:/\S+(?:\s+\S+)*/,alias:["yaml","language-yaml"],inside:e.languages.yaml}}},blockquote:{pattern:/^>(?:[\t ]*>)*/m,alias:"punctuation"},table:{pattern:RegExp("^"+i+a+"(?:"+i+")*","m"),inside:{"table-data-rows":{pattern:RegExp("^("+i+a+")(?:"+i+")*$"),lookbehind:!0,inside:{"table-data":{pattern:RegExp(r),inside:e.languages.markdown},punctuation:/\|/}},"table-line":{pattern:RegExp("^("+i+")"+a+"$"),lookbehind:!0,inside:{punctuation:/\||:?-{3,}:?/}},"table-header-row":{pattern:RegExp("^"+i+"$"),inside:{"table-header":{pattern:RegExp(r),alias:"important",inside:e.languages.markdown},punctuation:/\|/}}}},code:[{pattern:/((?:^|\n)[ \t]*\n|(?:^|\r\n?)[ \t]*\r\n?)(?: {4}|\t).+(?:(?:\n|\r\n?)(?: {4}|\t).+)*/,lookbehind:!0,alias:"keyword"},{pattern:/^```[\s\S]*?^```$/m,greedy:!0,inside:{"code-block":{pattern:/^(```.*(?:\n|\r\n?))[\s\S]+?(?=(?:\n|\r\n?)^```$)/m,lookbehind:!0},"code-language":{pattern:/^(```).+/,lookbehind:!0},punctuation:/```/}}],title:[{pattern:/\S.*(?:\n|\r\n?)(?:==+|--+)(?=[ \t]*$)/m,alias:"important",inside:{punctuation:/==+$|--+$/}},{pattern:/(^\s*)#.+/m,lookbehind:!0,alias:"important",inside:{punctuation:/^#+|#+$/}}],hr:{pattern:/(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m,lookbehind:!0,alias:"punctuation"},list:{pattern:/(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m,lookbehind:!0,alias:"punctuation"},"url-reference":{pattern:/!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/,inside:{variable:{pattern:/^(!?\[)[^\]]+/,lookbehind:!0},string:/(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/,punctuation:/^[\[\]!:]|[<>]/},alias:"url"},bold:{pattern:n(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^..)[\s\S]+(?=..$)/,lookbehind:!0,inside:{}},punctuation:/\*\*|__/}},italic:{pattern:n(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^.)[\s\S]+(?=.$)/,lookbehind:!0,inside:{}},punctuation:/[*_]/}},strike:{pattern:n(/(~~?)(?:(?!~)<inner>)+\2/.source),lookbehind:!0,greedy:!0,inside:{content:{pattern:/(^~~?)[\s\S]+(?=\1$)/,lookbehind:!0,inside:{}},punctuation:/~~?/}},"code-snippet":{pattern:/(^|[^\\`])(?:``[^`\r\n]+(?:`[^`\r\n]+)*``(?!`)|`[^`\r\n]+`(?!`))/,lookbehind:!0,greedy:!0,alias:["code","keyword"]},url:{pattern:n(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),lookbehind:!0,greedy:!0,inside:{operator:/^!/,content:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0,inside:{}},variable:{pattern:/(^\][ \t]?\[)[^\]]+(?=\]$)/,lookbehind:!0},url:{pattern:/(^\]\()[^\s)]+/,lookbehind:!0},string:{pattern:/(^[ \t]+)"(?:\\.|[^"\\])*"(?=\)$)/,lookbehind:!0}}}}),["url","bold","italic","strike"].forEach(function(c){["url","bold","italic","strike","code-snippet"].forEach(function(d){c!==d&&(e.languages.markdown[c].inside.content.inside[d]=e.languages.markdown[d])})}),e.hooks.add("after-tokenize",function(c){if(c.language!=="markdown"&&c.language!=="md")return;function d(f){if(!(!f||typeof f=="string"))for(var g=0,p=f.length;g<p;g++){var m=f[g];if(m.type!=="code"){d(m.content);continue}var v=m.content[1],x=m.content[3];if(v&&x&&v.type==="code-language"&&x.type==="code-block"&&typeof v.content=="string"){var y=v.content.replace(/\b#/g,"sharp").replace(/\b\+\+/g,"pp");y=(/[a-z][\w-]*/i.exec(y)||[""])[0].toLowerCase();var b="language-"+y;x.alias?typeof x.alias=="string"?x.alias=[x.alias,b]:x.alias.push(b):x.alias=[b]}}}d(c.tokens)}),e.hooks.add("wrap",function(c){if(c.type==="code-block"){for(var d="",f=0,g=c.classes.length;f<g;f++){var p=c.classes[f],m=/language-(.+)/.exec(p);if(m){d=m[1];break}}var v=e.languages[d];if(v)c.content=e.highlight(u(c.content),v,d);else if(d&&d!=="none"&&e.plugins.autoloader){var x="md-"+new Date().valueOf()+"-"+Math.floor(Math.random()*1e16);c.attributes.id=x,e.plugins.autoloader.loadLanguages(d,function(){var y=document.getElementById(x);y&&(y.innerHTML=e.highlight(y.textContent,e.languages[d],d))})}}});var s=RegExp(e.languages.markup.tag.pattern.source,"gi"),o={amp:"&",lt:"<",gt:">",quot:'"'},l=String.fromCodePoint||String.fromCharCode;function u(c){var d=c.replace(s,"");return d=d.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi,function(f,g){if(g=g.toLowerCase(),g[0]==="#"){var p;return g[1]==="x"?p=parseInt(g.slice(2),16):p=Number(g.slice(1)),l(p)}else{var m=o[g];return m||f}}),d}e.languages.md=e.languages.markdown}(Prism),Prism.languages.c=Prism.languages.extend("clike",{comment:{pattern:/\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"class-name":{pattern:/(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/,lookbehind:!0},keyword:/\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|__attribute__|asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|inline|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|typeof|union|unsigned|void|volatile|while)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,number:/(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i,operator:/>>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/}),Prism.languages.insertBefore("c","string",{char:{pattern:/'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n]){0,32}'/,greedy:!0}}),Prism.languages.insertBefore("c","string",{macro:{pattern:/(^[\t ]*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im,lookbehind:!0,greedy:!0,alias:"property",inside:{string:[{pattern:/^(#\s*include\s*)<[^>]+>/,lookbehind:!0},Prism.languages.c.string],char:Prism.languages.c.char,comment:Prism.languages.c.comment,"macro-name":[{pattern:/(^#\s*define\s+)\w+\b(?!\()/i,lookbehind:!0},{pattern:/(^#\s*define\s+)\w+\b(?=\()/i,lookbehind:!0,alias:"function"}],directive:{pattern:/^(#\s*)[a-z]+/,lookbehind:!0,alias:"keyword"},"directive-hash":/^#/,punctuation:/##|\\(?=[\r\n])/,expression:{pattern:/\S[\s\S]*/,inside:Prism.languages.c}}}}),Prism.languages.insertBefore("c","function",{constant:/\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/}),delete Prism.languages.c.boolean,function(e){var t=/(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;e.languages.css={comment:/\/\*[\s\S]*?\*\//,atrule:{pattern:RegExp("@[\\w-](?:"+/[^;{\s"']|\s+(?!\s)/.source+"|"+t.source+")*?"+/(?:;|(?=\s*\{))/.source),inside:{rule:/^@[\w-]+/,"selector-function-argument":{pattern:/(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/,lookbehind:!0,alias:"selector"},keyword:{pattern:/(^|[^\w-])(?:and|not|only|or)(?![\w-])/,lookbehind:!0}}},url:{pattern:RegExp("\\burl\\((?:"+t.source+"|"+/(?:[^\\\r\n()"']|\\[\s\S])*/.source+")\\)","i"),greedy:!0,inside:{function:/^url/i,punctuation:/^\(|\)$/,string:{pattern:RegExp("^"+t.source+"$"),alias:"url"}}},selector:{pattern:RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|`+t.source+")*(?=\\s*\\{)"),lookbehind:!0},string:{pattern:t,greedy:!0},property:{pattern:/(^|[^-\w\xA0-\uFFFF])(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i,lookbehind:!0},important:/!important\b/i,function:{pattern:/(^|[^-a-z0-9])[-a-z0-9]+(?=\()/i,lookbehind:!0},punctuation:/[(){};:,]/},e.languages.css.atrule.inside.rest=e.languages.css;var n=e.languages.markup;n&&(n.tag.addInlined("style","css"),n.tag.addAttribute("style","css"))}(Prism),Prism.languages.objectivec=Prism.languages.extend("c",{string:{pattern:/@?"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:asm|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|in|inline|int|long|register|return|self|short|signed|sizeof|static|struct|super|switch|typedef|typeof|union|unsigned|void|volatile|while)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/,operator:/-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete Prism.languages.objectivec["class-name"],Prism.languages.objc=Prism.languages.objectivec,Prism.languages.sql={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},variable:[{pattern:/@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/,greedy:!0},/@[\w.$]+/],string:{pattern:/(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/,greedy:!0,lookbehind:!0},identifier:{pattern:/(^|[^@\\])`(?:\\[\s\S]|[^`\\]|``)*`/,greedy:!0,lookbehind:!0,inside:{punctuation:/^`|`$/}},function:/\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i,keyword:/\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:COL|_INSERT)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURN(?:ING|S)?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i,boolean:/\b(?:FALSE|NULL|TRUE)\b/i,number:/\b0x[\da-f]+\b|\b\d+(?:\.\d*)?|\B\.\d+\b/i,operator:/[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,punctuation:/[;[\]()`,.]/},function(e){var t=e.languages.powershell={comment:[{pattern:/(^|[^`])<#[\s\S]*?#>/,lookbehind:!0},{pattern:/(^|[^`])#.*/,lookbehind:!0}],string:[{pattern:/"(?:`[\s\S]|[^`"])*"/,greedy:!0,inside:null},{pattern:/'(?:[^']|'')*'/,greedy:!0}],namespace:/\[[a-z](?:\[(?:\[[^\]]*\]|[^\[\]])*\]|[^\[\]])*\]/i,boolean:/\$(?:false|true)\b/i,variable:/\$\w+\b/,function:[/\b(?:Add|Approve|Assert|Backup|Block|Checkpoint|Clear|Close|Compare|Complete|Compress|Confirm|Connect|Convert|ConvertFrom|ConvertTo|Copy|Debug|Deny|Disable|Disconnect|Dismount|Edit|Enable|Enter|Exit|Expand|Export|Find|ForEach|Format|Get|Grant|Group|Hide|Import|Initialize|Install|Invoke|Join|Limit|Lock|Measure|Merge|Move|New|Open|Optimize|Out|Ping|Pop|Protect|Publish|Push|Read|Receive|Redo|Register|Remove|Rename|Repair|Request|Reset|Resize|Resolve|Restart|Restore|Resume|Revoke|Save|Search|Select|Send|Set|Show|Skip|Sort|Split|Start|Step|Stop|Submit|Suspend|Switch|Sync|Tee|Test|Trace|Unblock|Undo|Uninstall|Unlock|Unprotect|Unpublish|Unregister|Update|Use|Wait|Watch|Where|Write)-[a-z]+\b/i,/\b(?:ac|cat|chdir|clc|cli|clp|clv|compare|copy|cp|cpi|cpp|cvpa|dbp|del|diff|dir|ebp|echo|epal|epcsv|epsn|erase|fc|fl|ft|fw|gal|gbp|gc|gci|gcs|gdr|gi|gl|gm|gp|gps|group|gsv|gu|gv|gwmi|iex|ii|ipal|ipcsv|ipsn|irm|iwmi|iwr|kill|lp|ls|measure|mi|mount|move|mp|mv|nal|ndr|ni|nv|ogv|popd|ps|pushd|pwd|rbp|rd|rdr|ren|ri|rm|rmdir|rni|rnp|rp|rv|rvpa|rwmi|sal|saps|sasv|sbp|sc|select|set|shcm|si|sl|sleep|sls|sort|sp|spps|spsv|start|sv|swmi|tee|trcm|type|write)\b/i],keyword:/\b(?:Begin|Break|Catch|Class|Continue|Data|Define|Do|DynamicParam|Else|ElseIf|End|Exit|Filter|Finally|For|ForEach|From|Function|If|InlineScript|Parallel|Param|Process|Return|Sequence|Switch|Throw|Trap|Try|Until|Using|Var|While|Workflow)\b/i,operator:{pattern:/(^|\W)(?:!|-(?:b?(?:and|x?or)|as|(?:Not)?(?:Contains|In|Like|Match)|eq|ge|gt|is(?:Not)?|Join|le|lt|ne|not|Replace|sh[lr])\b|-[-=]?|\+[+=]?|[*\/%]=?)/i,lookbehind:!0},punctuation:/[|{}[\];(),.]/};t.string[0].inside={function:{pattern:/(^|[^`])\$\((?:\$\([^\r\n()]*\)|(?!\$\()[^\r\n)])*\)/,lookbehind:!0,inside:t},boolean:t.boolean,variable:t.variable}}(Prism),Prism.languages.python={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0,greedy:!0},"string-interpolation":{pattern:/(?:f|fr|rf)(?:("""|''')[\s\S]*?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^{])(?:\{\{)*)\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}]|\{(?!\{)(?:[^{}])+\})+\})+\}/,lookbehind:!0,inside:{"format-spec":{pattern:/(:)[^:(){}]+(?=\}$)/,lookbehind:!0},"conversion-option":{pattern:/![sra](?=[:}]$)/,alias:"punctuation"},rest:null}},string:/[\s\S]+/}},"triple-quoted-string":{pattern:/(?:[rub]|br|rb)?("""|''')[\s\S]*?\1/i,greedy:!0,alias:"string"},string:{pattern:/(?:[rub]|br|rb)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i,greedy:!0},function:{pattern:/((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g,lookbehind:!0},"class-name":{pattern:/(\bclass\s+)\w+/i,lookbehind:!0},decorator:{pattern:/(^[\t ]*)@\w+(?:\.\w+)*/m,lookbehind:!0,alias:["annotation","punctuation"],inside:{punctuation:/\./}},keyword:/\b(?:_(?=\s*:)|and|as|assert|async|await|break|case|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|match|nonlocal|not|or|pass|print|raise|return|try|while|with|yield)\b/,builtin:/\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip)\b/,boolean:/\b(?:False|None|True)\b/,number:/\b0(?:b(?:_?[01])+|o(?:_?[0-7])+|x(?:_?[a-f0-9])+)\b|(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)(?:e[+-]?\d+(?:_\d+)*)?j?(?!\w)/i,operator:/[-+%=]=?|!=|:=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},Prism.languages.python["string-interpolation"].inside.interpolation.inside.rest=Prism.languages.python,Prism.languages.py=Prism.languages.python,function(e){for(var t=/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source,n=0;n<2;n++)t=t.replace(/<self>/g,function(){return t});t=t.replace(/<self>/g,function(){return/[^\s\S]/.source}),e.languages.rust={comment:[{pattern:RegExp(/(^|[^\\])/.source+t),lookbehind:!0,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/,greedy:!0},char:{pattern:/b?'(?:\\(?:x[0-7][\da-fA-F]|u\{(?:[\da-fA-F]_*){1,6}\}|.)|[^\\\r\n\t'])'/,greedy:!0},attribute:{pattern:/#!?\[(?:[^\[\]"]|"(?:\\[\s\S]|[^\\"])*")*\]/,greedy:!0,alias:"attr-name",inside:{string:null}},"closure-params":{pattern:/([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/,lookbehind:!0,greedy:!0,inside:{"closure-punctuation":{pattern:/^\||\|$/,alias:"punctuation"},rest:null}},"lifetime-annotation":{pattern:/'\w+/,alias:"symbol"},"fragment-specifier":{pattern:/(\$\w+:)[a-z]+/,lookbehind:!0,alias:"punctuation"},variable:/\$\w+/,"function-definition":{pattern:/(\bfn\s+)\w+/,lookbehind:!0,alias:"function"},"type-definition":{pattern:/(\b(?:enum|struct|trait|type|union)\s+)\w+/,lookbehind:!0,alias:"class-name"},"module-declaration":[{pattern:/(\b(?:crate|mod)\s+)[a-z][a-z_\d]*/,lookbehind:!0,alias:"namespace"},{pattern:/(\b(?:crate|self|super)\s*)::\s*[a-z][a-z_\d]*\b(?:\s*::(?:\s*[a-z][a-z_\d]*\s*::)*)?/,lookbehind:!0,alias:"namespace",inside:{punctuation:/::/}}],keyword:[/\b(?:Self|abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/,/\b(?:bool|char|f(?:32|64)|[ui](?:8|16|32|64|128|size)|str)\b/],function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())/,macro:{pattern:/\b\w+!/,alias:"property"},constant:/\b[A-Z_][A-Z_\d]+\b/,"class-name":/\b[A-Z]\w*\b/,namespace:{pattern:/(?:\b[a-z][a-z_\d]*\s*::\s*)*\b[a-z][a-z_\d]*\s*::(?!\s*<)/,inside:{punctuation:/::/}},number:/\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:(?:\d(?:_?\d)*)?\.)?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:f32|f64|[iu](?:8|16|32|64|size)?))?\b/,boolean:/\b(?:false|true)\b/,punctuation:/->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,operator:/[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/},e.languages.rust["closure-params"].inside.rest=e.languages.rust,e.languages.rust.attribute.inside.string=e.languages.rust.string}(Prism),Prism.languages.swift={comment:{pattern:/(^|[^\\:])(?:\/\/.*|\/\*(?:[^/*]|\/(?!\*)|\*(?!\/)|\/\*(?:[^*]|\*(?!\/))*\*\/)*\*\/)/,lookbehind:!0,greedy:!0},"string-literal":[{pattern:RegExp(/(^|[^"#])/.source+"(?:"+/"(?:\\(?:\((?:[^()]|\([^()]*\))*\)|\r\n|[^(])|[^\\\r\n"])*"/.source+"|"+/"""(?:\\(?:\((?:[^()]|\([^()]*\))*\)|[^(])|[^\\"]|"(?!""))*"""/.source+")"+/(?!["#])/.source),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\\($/,alias:"punctuation"},punctuation:/\\(?=[\r\n])/,string:/[\s\S]+/}},{pattern:RegExp(/(^|[^"#])(#+)/.source+"(?:"+/"(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|\r\n|[^#])|[^\\\r\n])*?"/.source+"|"+/"""(?:\\(?:#+\((?:[^()]|\([^()]*\))*\)|[^#])|[^\\])*?"""/.source+")\\2"),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/(\\#+\()(?:[^()]|\([^()]*\))*(?=\))/,lookbehind:!0,inside:null},"interpolation-punctuation":{pattern:/^\)|\\#+\($/,alias:"punctuation"},string:/[\s\S]+/}}],directive:{pattern:RegExp(/#/.source+"(?:"+(/(?:elseif|if)\b/.source+"(?:[ ]*"+/(?:![ \t]*)?(?:\b\w+\b(?:[ \t]*\((?:[^()]|\([^()]*\))*\))?|\((?:[^()]|\([^()]*\))*\))(?:[ \t]*(?:&&|\|\|))?/.source+")+")+"|"+/(?:else|endif)\b/.source+")"),alias:"property",inside:{"directive-name":/^#\w+/,boolean:/\b(?:false|true)\b/,number:/\b\d+(?:\.\d+)*\b/,operator:/!|&&|\|\||[<>]=?/,punctuation:/[(),]/}},literal:{pattern:/#(?:colorLiteral|column|dsohandle|file(?:ID|Literal|Path)?|function|imageLiteral|line)\b/,alias:"constant"},"other-directive":{pattern:/#\w+\b/,alias:"property"},attribute:{pattern:/@\w+/,alias:"atrule"},"function-definition":{pattern:/(\bfunc\s+)\w+/,lookbehind:!0,alias:"function"},label:{pattern:/\b(break|continue)\s+\w+|\b[a-zA-Z_]\w*(?=\s*:\s*(?:for|repeat|while)\b)/,lookbehind:!0,alias:"important"},keyword:/\b(?:Any|Protocol|Self|Type|actor|as|assignment|associatedtype|associativity|async|await|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic|else|enum|extension|fallthrough|fileprivate|final|for|func|get|guard|higherThan|if|import|in|indirect|infix|init|inout|internal|is|isolated|lazy|left|let|lowerThan|mutating|none|nonisolated|nonmutating|open|operator|optional|override|postfix|precedencegroup|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|set|some|static|struct|subscript|super|switch|throw|throws|try|typealias|unowned|unsafe|var|weak|where|while|willSet)\b/,boolean:/\b(?:false|true)\b/,nil:{pattern:/\bnil\b/,alias:"constant"},"short-argument":/\$\d+\b/,omit:{pattern:/\b_\b/,alias:"keyword"},number:/\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i,"class-name":/\b[A-Z](?:[A-Z_\d]*[a-z]\w*)?\b/,function:/\b[a-z_]\w*(?=\s*\()/i,constant:/\b(?:[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/,operator:/[-+*/%=!<>&|^~?]+|\.[.\-+*/%=!<>&|^~?]+/,punctuation:/[{}[\]();,.:\\]/},Prism.languages.swift["string-literal"].forEach(function(e){e.inside.interpolation.inside=Prism.languages.swift}),function(e){e.languages.typescript=e.languages.extend("javascript",{"class-name":{pattern:/(\b(?:class|extends|implements|instanceof|interface|new|type)\s+)(?!keyof\b)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?:\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>)?/,lookbehind:!0,greedy:!0,inside:null},builtin:/\b(?:Array|Function|Promise|any|boolean|console|never|number|string|symbol|unknown)\b/}),e.languages.typescript.keyword.push(/\b(?:abstract|declare|is|keyof|readonly|require)\b/,/\b(?:asserts|infer|interface|module|namespace|type)\b(?=\s*(?:[{_$a-zA-Z\xA0-\uFFFF]|$))/,/\btype\b(?=\s*(?:[\{*]|$))/),delete e.languages.typescript.parameter,delete e.languages.typescript["literal-property"];var t=e.languages.extend("typescript",{});delete t["class-name"],e.languages.typescript["class-name"].inside=t,e.languages.insertBefore("typescript","function",{decorator:{pattern:/@[$\w\xA0-\uFFFF]+/,inside:{at:{pattern:/^@/,alias:"operator"},function:/^[\s\S]+/}},"generic-function":{pattern:/#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>(?=\s*\()/,greedy:!0,inside:{function:/^#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:t}}}}),e.languages.ts=e.languages.typescript}(Prism),function(e){var t=/\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/,n=/(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source,r={pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),lookbehind:!0,inside:{namespace:{pattern:/^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/,inside:{punctuation:/\./}},punctuation:/\./}};e.languages.java=e.languages.extend("clike",{string:{pattern:/(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,lookbehind:!0,greedy:!0},"class-name":[r,{pattern:RegExp(/(^|[^\w.])/.source+n+/[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),lookbehind:!0,inside:r.inside},{pattern:RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source+n+/[A-Z]\w*\b/.source),lookbehind:!0,inside:r.inside}],keyword:t,function:[e.languages.clike.function,{pattern:/(::\s*)[a-z_]\w*/,lookbehind:!0}],number:/\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i,operator:{pattern:/(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m,lookbehind:!0},constant:/\b[A-Z][A-Z_\d]+\b/}),e.languages.insertBefore("java","string",{"triple-quoted-string":{pattern:/"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,greedy:!0,alias:"string"},char:{pattern:/'(?:\\.|[^'\\\r\n]){1,6}'/,greedy:!0}}),e.languages.insertBefore("java","class-name",{annotation:{pattern:/(^|[^.])@\w+(?:\s*\.\s*\w+)*/,lookbehind:!0,alias:"punctuation"},generics:{pattern:/<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,inside:{"class-name":r,keyword:t,punctuation:/[<>(),.:]/,operator:/[?&|]/}},import:[{pattern:RegExp(/(\bimport\s+)/.source+n+/(?:[A-Z]\w*|\*)(?=\s*;)/.source),lookbehind:!0,inside:{namespace:r.inside.namespace,punctuation:/\./,operator:/\*/,"class-name":/\w+/}},{pattern:RegExp(/(\bimport\s+static\s+)/.source+n+/(?:\w+|\*)(?=\s*;)/.source),lookbehind:!0,alias:"static",inside:{namespace:r.inside.namespace,static:/\b\w+$/,punctuation:/\./,operator:/\*/,"class-name":/\w+/}}],namespace:{pattern:RegExp(/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0,inside:{punctuation:/\./}}})}(Prism),function(e){var t=/\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|char8_t|class|co_await|co_return|co_yield|compl|concept|const|const_cast|consteval|constexpr|constinit|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|final|float|for|friend|goto|if|import|inline|int|int16_t|int32_t|int64_t|int8_t|long|module|mutable|namespace|new|noexcept|nullptr|operator|override|private|protected|public|register|reinterpret_cast|requires|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|uint16_t|uint32_t|uint64_t|uint8_t|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/,n=/\b(?!<keyword>)\w+(?:\s*\.\s*\w+)*\b/.source.replace(/<keyword>/g,function(){return t.source});e.languages.cpp=e.languages.extend("c",{"class-name":[{pattern:RegExp(/(\b(?:class|concept|enum|struct|typename)\s+)(?!<keyword>)\w+/.source.replace(/<keyword>/g,function(){return t.source})),lookbehind:!0},/\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/,/\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i,/\b\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/],keyword:t,number:{pattern:/(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i,greedy:!0},operator:/>>=?|<<=?|->|--|\+\+|&&|\|\||[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/,boolean:/\b(?:false|true)\b/}),e.languages.insertBefore("cpp","string",{module:{pattern:RegExp(/(\b(?:import|module)\s+)/.source+"(?:"+/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|<[^<>\r\n]*>/.source+"|"+/<mod-name>(?:\s*:\s*<mod-name>)?|:\s*<mod-name>/.source.replace(/<mod-name>/g,function(){return n})+")"),lookbehind:!0,greedy:!0,inside:{string:/^[<"][\s\S]+/,operator:/:/,punctuation:/\./}},"raw-string":{pattern:/R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/,alias:"string",greedy:!0}}),e.languages.insertBefore("cpp","keyword",{"generic-function":{pattern:/\b(?!operator\b)[a-z_]\w*\s*<(?:[^<>]|<[^<>]*>)*>(?=\s*\()/i,inside:{function:/^\w+/,generic:{pattern:/<[\s\S]+/,alias:"class-name",inside:e.languages.cpp}}}}),e.languages.insertBefore("cpp","operator",{"double-colon":{pattern:/::/,alias:"punctuation"}}),e.languages.insertBefore("cpp","class-name",{"base-clause":{pattern:/(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/,lookbehind:!0,greedy:!0,inside:e.languages.extend("cpp",{})}}),e.languages.insertBefore("inside","double-colon",{"class-name":/\b[a-z_]\w*\b(?!\s*::)/i},e.languages.cpp["base-clause"])}(Prism);function I1(e,t){for(const n of e.childNodes){if(yt(n)&&n.tagName===t)return!0;I1(n,t)}return!1}const Co="data-language",Mo="data-highlight-language",Vu="data-theme";class jo extends wn{constructor(n,r){super(r);ee(this,"__language");ee(this,"__theme");ee(this,"__isSyntaxHighlightSupported");this.__language=n||void 0,this.__isSyntaxHighlightSupported=!1,this.__theme=void 0}static getType(){return"code"}static clone(n){return new jo(n.__language,n.__key)}afterCloneFrom(n){super.afterCloneFrom(n),this.__language=n.__language,this.__theme=n.__theme,this.__isSyntaxHighlightSupported=n.__isSyntaxHighlightSupported}createDOM(n){const r=document.createElement("code");Xr(r,n.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(Co,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Mo,i));const a=this.getTheme();a&&r.setAttribute(Vu,a);const s=this.getStyle();return s&&r.setAttribute("style",s),r}updateDOM(n,r,i){const a=this.__language,s=n.__language;a?a!==s&&r.setAttribute(Co,a):s&&r.removeAttribute(Co);const o=this.__isSyntaxHighlightSupported;n.__isSyntaxHighlightSupported&&s?o&&a?a!==s&&r.setAttribute(Mo,a):r.removeAttribute(Mo):o&&a&&r.setAttribute(Mo,a);const l=this.__theme,u=n.__theme;l?l!==u&&r.setAttribute(Vu,l):u&&r.removeAttribute(Vu);const c=this.__style,d=n.__style;return c?c!==d&&r.setAttribute("style",c):d&&r.removeAttribute("style"),!1}exportDOM(n){const r=document.createElement("pre");Xr(r,n._config.theme.code),r.setAttribute("spellcheck","false");const i=this.getLanguage();i&&(r.setAttribute(Co,i),this.getIsSyntaxHighlightSupported()&&r.setAttribute(Mo,i));const a=this.getTheme();a&&r.setAttribute(Vu,a);const s=this.getStyle();return s&&r.setAttribute("style",s),{element:r}}static importDOM(){return{code:n=>n.textContent!=null&&(/\r?\n/.test(n.textContent)||I1(n,"BR"))?{conversion:z1,priority:1}:null,div:()=>({conversion:U2,priority:1}),pre:()=>({conversion:z1,priority:0}),table:n=>Rh(n)?{conversion:H2,priority:3}:null,td:n=>{const r=n,i=r.closest("table");return r.classList.contains("js-file-line")||i&&Rh(i)?{conversion:R1,priority:3}:null},tr:n=>{const r=n.closest("table");return r&&Rh(r)?{conversion:R1,priority:3}:null}}}static importJSON(n){return ps().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setLanguage(n.language).setTheme(n.theme)}exportJSON(){return{...super.exportJSON(),language:this.getLanguage(),theme:this.getTheme()}}insertNewAfter(n,r=!0){const i=this.getChildren(),a=i.length;if(a>=2&&i[a-1].getTextContent()===`
291
+ `&&i[a-2].getTextContent()===`
292
+ `&&n.isCollapsed()&&n.anchor.key===this.__key&&n.anchor.offset===a){i[a-1].remove(),i[a-2].remove();const u=tt();return this.insertAfter(u,r),u}const{anchor:s,focus:o}=n,l=(s.isBefore(o)?s:o).getNode();if(ce(l)){let u=V2(l);const c=[];for(;;)if(wu(u))c.push(Ka()),u=u.getNextSibling();else{if(!U1(u))break;{let x=0;const y=u.getTextContent(),b=u.getTextContentSize();for(;x<b&&y[x]===" ";)x++;if(x!==0&&c.push(W1(" ".repeat(x))),x!==b)break;u=u.getNextSibling()}}const d=l.splitText(s.offset)[0],f=s.offset===0?0:1,g=d.getIndexWithinParent()+f,p=l.getParentOrThrow(),m=[Wr(),...c];p.splice(g,0,m);const v=c[c.length-1];v?v.select():s.offset===0?d.selectPrevious():d.getNextSibling().selectNext(0,0)}if(F1(l)){const{offset:u}=n.anchor;l.splice(u,0,[Wr()]),l.select(u+1,u+1)}return null}canIndent(){return!1}collapseAtStart(){const n=tt();return this.getChildren().forEach(r=>n.append(r)),this.replace(n),!0}setLanguage(n){const r=this.getWritable();return r.__language=n||void 0,r}getLanguage(){return this.getLatest().__language}setIsSyntaxHighlightSupported(n){const r=this.getWritable();return r.__isSyntaxHighlightSupported=n,r}getIsSyntaxHighlightSupported(){return this.getLatest().__isSyntaxHighlightSupported}setTheme(n){const r=this.getWritable();return r.__theme=n||void 0,r}getTheme(){return this.getLatest().__theme}}function ps(e,t){return XO(jo).setLanguage(e).setTheme(t)}function F1(e){return e instanceof jo}function z1(e){return{node:ps(e.getAttribute(Co))}}function U2(e){const t=e,n=B1(t);return n||function(r){let i=r.parentElement;for(;i!==null;){if(B1(i))return!0;i=i.parentElement}return!1}(t)?{node:n?ps():null}:{node:null}}function H2(){return{node:ps()}}function R1(){return{node:null}}function B1(e){return e.style.fontFamily.match("monospace")!==null}function Rh(e){return e.classList.contains("js-file-line-container")}class Ku extends Ur{constructor(n="",r,i){super(n,i);ee(this,"__highlightType");this.__highlightType=r}static getType(){return"code-highlight"}static clone(n){return new Ku(n.__text,n.__highlightType||void 0,n.__key)}getHighlightType(){return this.getLatest().__highlightType}setHighlightType(n){const r=this.getWritable();return r.__highlightType=n||void 0,r}canHaveFormat(){return!1}createDOM(n){const r=super.createDOM(n),i=Bh(n.theme,this.__highlightType);return Xr(r,i),r}updateDOM(n,r,i){const a=super.updateDOM(n,r,i),s=Bh(i.theme,n.__highlightType),o=Bh(i.theme,this.__highlightType);return s!==o&&(s&&yh(r,s),o&&Xr(r,o)),a}static importJSON(n){return W1().updateFromJSON(n)}updateFromJSON(n){return super.updateFromJSON(n).setHighlightType(n.highlightType)}exportJSON(){return{...super.exportJSON(),highlightType:this.getHighlightType()}}setFormat(n){return this}isParentRequired(){return!0}createParentElementNode(){return ps()}}function Bh(e,t){return t&&e&&e.codeHighlight&&e.codeHighlight[t]}function W1(e="",t){return tr(new Ku(e,t))}function U1(e){return e instanceof Ku}function q2(e,t){let n=e;for(let r=St(e,t);r&&(U1(r.origin)||wu(r.origin));r=k$(r))n=r.origin;return n}function V2(e){return q2(e,"previous")}(function(e){e.languages.diff={coord:[/^(?:\*{3}|-{3}|\+{3}).*$/m,/^@@.*@@$/m,/^\d.*$/m]};var t={"deleted-sign":"-","deleted-arrow":"<","inserted-sign":"+","inserted-arrow":">",unchanged:" ",diff:"!"};Object.keys(t).forEach(function(n){var r=t[n],i=[];/^\w+$/.test(n)||i.push(/\w+/.exec(n)[0]),n==="diff"&&i.push("bold"),e.languages.diff[n]={pattern:RegExp("^(?:["+r+`].*(?:\r
293
+ ?|
294
+ |(?![\\s\\S])))+`,"m"),alias:i,inside:{line:{pattern:/(.)(?=[\s\S]).*(?:\r\n?|\n)?/,lookbehind:!0},prefix:{pattern:/[\s\S]/,alias:/\w+/.exec(n)[0]}}}}),Object.defineProperty(e.languages.diff,"PREFIXES",{value:t})})(Prism);const K2=["bold","italic","underline","strikethrough","code"],Wh=["paragraph","h2","quote","code"];function Y2(e){const t=Wh.indexOf(e);return t===-1?"paragraph":Wh[(t+1)%Wh.length]}function G2(e){switch(e){case"h2":return"Heading";case"quote":return"Quote";case"code":return"Code";case"paragraph":default:return"Paragraph"}}function H1(e){var n;return typeof window>"u"||typeof DOMParser>"u"?e.replace(/<[^>]*>/g," ").replace(/\s+/g," ").trim():((n=new DOMParser().parseFromString(e,"text/html").body.textContent)==null?void 0:n.replace(/\s+/g," ").trim())??""}function Oo(e){return!e||e.trim().length===0?"<p><br></p>":e}function X2({id:e,editorValue:t,placeholder:n,disabled:r,readOnly:i,attachments:a,footerChecked:s,footerLabel:o,showFooter:l,cancelLabel:u,confirmLabel:c,onCancel:d,onConfirm:f,onAttachmentRemove:g,onAddAttachment:p,onFooterCheckedChange:m,onHtmlChange:v,onCharacterCountChange:x,labelledBy:y,ariaLabel:b,describedBy:k}){const[w]=Jr(),S=_.useRef(Oo(t)),[N,E]=_.useState({canUndo:!1,canRedo:!1,isBold:!1,isItalic:!1,isUnderline:!1,isStrikethrough:!1,isLink:!1,blockType:"paragraph",alignment:"left"});_.useEffect(()=>{w.setEditable(!(r||i))},[r,w,i]),_.useEffect(()=>{const P=Oo(t);P!==S.current&&(w.update(()=>{const B=new DOMParser().parseFromString(P,"text/html"),W=Ch(w,B),q=lt();q.clear(),W.length>0?q.append(...W):q.append(tt())}),S.current=P,x(H1(P).length))},[w,t,x]),_.useEffect(()=>{const P=()=>{w.getEditorState().read(()=>{const D=de();if(!ie(D)){E(K=>({...K,isBold:!1,isItalic:!1,isUnderline:!1,isStrikethrough:!1,isLink:!1,blockType:"paragraph"}));return}const A=D.anchor.getNode(),U=A.getTopLevelElementOrThrow(),Y=A.getParent();let G="paragraph";a2(U)&&U.getTag()==="h2"?G="h2":r2(U)?G="quote":F1(U)?G="code":je(U)&&(G=U.getListType()==="bullet"?"ul":"ol");const J=U.getFormatType(),R=J===""?"left":J;E(K=>({...K,isBold:D.hasFormat("bold"),isItalic:D.hasFormat("italic"),isUnderline:D.hasFormat("underline"),isStrikethrough:D.hasFormat("strikethrough"),isLink:Nr(A)||Y!=null&&Nr(Y),blockType:G,alignment:R}))})},F=w.registerUpdateListener(()=>{P()}),B=w.registerCommand(kf,()=>(P(),!1),xr),W=w.registerCommand(so,D=>(E(A=>({...A,canUndo:D})),!1),xr),q=w.registerCommand(ao,D=>(E(A=>({...A,canRedo:D})),!1),xr);return P(),()=>{F(),B(),W(),q()}},[w]);function T(P){w.update(()=>{const F=de();if(ie(F)){if(P==="paragraph"){xo(F,()=>tt());return}if(P==="h2"){xo(F,()=>cs("h2"));return}if(P==="quote"){xo(F,()=>Mh());return}if(P==="code"){xo(F,()=>ps());return}}})}function C(P){if(N.blockType===P){w.dispatchCommand(Dh,void 0);return}w.dispatchCommand(P==="ul"?M1:j1,void 0)}function O(){if(N.isLink){w.dispatchCommand(To,null);return}const P=window.prompt("Enter link URL");P&&w.dispatchCommand(To,P)}function $(){w.update(()=>{const P=de();ie(P)&&(K2.forEach(F=>{P.hasFormat(F)&&w.dispatchCommand(_n,F)}),w.dispatchCommand(To,null),w.dispatchCommand(Dh,void 0),w.dispatchCommand(Ba,"left"),xo(P,()=>tt()))})}const M=r||i;function j(P){w.update(()=>{const F=de();ie(F)&&F.insertText(P)})}return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"dsn-rich-text-editor-toolbar",role:"toolbar","aria-label":"Rich text formatting toolbar",children:[h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-select",disabled:M,"aria-label":"Cycle block style",onClick:()=>T(Y2(N.blockType)),children:G2(N.blockType)}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.isBold,"aria-label":"Bold",onClick:()=>w.dispatchCommand(_n,"bold"),icon:h.jsx(fC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.isItalic,"aria-label":"Italic",onClick:()=>w.dispatchCommand(_n,"italic"),icon:h.jsx(bC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.isUnderline,"aria-label":"Underline",onClick:()=>w.dispatchCommand(_n,"underline"),icon:h.jsx(LC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.isStrikethrough,"aria-label":"Strikethrough",onClick:()=>w.dispatchCommand(_n,"strikethrough"),icon:h.jsx(jC,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="left","aria-label":"Align left",onClick:()=>w.dispatchCommand(Ba,"left"),icon:h.jsx(AC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="center","aria-label":"Align center",onClick:()=>w.dispatchCommand(Ba,"center"),icon:h.jsx(OC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="right","aria-label":"Align right",onClick:()=>w.dispatchCommand(Ba,"right"),icon:h.jsx($C,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.alignment==="justify","aria-label":"Justify",onClick:()=>w.dispatchCommand(Ba,"justify"),icon:h.jsx(PC,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="ul","aria-label":"Bulleted list",onClick:()=>C("ul"),icon:h.jsx(wC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="ol","aria-label":"Numbered list",onClick:()=>C("ol"),icon:h.jsx(_C,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="quote","aria-label":"Quote block",onClick:()=>T(N.blockType==="quote"?"paragraph":"quote"),icon:h.jsx(TC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.blockType==="code","aria-label":"Code block",onClick:()=>T(N.blockType==="code"?"paragraph":"code"),icon:h.jsx(mC,{size:16,"aria-hidden":"true"})}),h.jsx(cn,{variant:"ghost",size:"sm",disabled:M,selected:N.isLink,"aria-label":"Toggle link",onClick:O,icon:h.jsx(Fy,{size:16,"aria-hidden":"true"})}),h.jsx("div",{className:"dsn-rich-text-editor-toolbar-divider","aria-hidden":"true"}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M||!N.canUndo,"aria-label":"Undo",onClick:()=>w.dispatchCommand(cu,void 0),children:h.jsx(DC,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M||!N.canRedo,"aria-label":"Redo",onClick:()=>w.dispatchCommand(du,void 0),children:h.jsx(CC,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Clear formatting",onClick:$,children:h.jsx(xC,{size:16,"aria-hidden":"true"})})]}),h.jsxs("div",{className:"dsn-rich-text-editor-content-wrap",children:[h.jsx(c2,{contentEditable:h.jsx(p2,{id:e,className:"dsn-rich-text-editor-content","aria-label":b,"aria-labelledby":y,"aria-describedby":k,"aria-readonly":i||r||void 0,"aria-disabled":r||void 0}),placeholder:h.jsx("div",{className:"dsn-rich-text-editor-placeholder",children:n}),ErrorBoundary:B2}),h.jsx(x2,{}),h.jsx(O2,{}),h.jsx(I2,{}),h.jsx(_2,{onChange:(P,F)=>{P.read(()=>{const B=Qb(F,null),W=lt().getTextContent();S.current=B,x(W.length),v(B)})}})]}),(a.length>0||p)&&h.jsxs("div",{className:"dsn-rich-text-editor-attachments","aria-label":"Attached files",children:[a.map(P=>h.jsx(Gd,{fileName:P.fileName,fileSize:P.fileSize,action:"remove",size:"md",disabled:M,onRemove:g?()=>g(P.id):void 0,"aria-label":P.fileName},P.id)),p&&h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Add attachment",onClick:p,children:h.jsx(SC,{size:16,"aria-hidden":"true"})}),h.jsx("button",{type:"button",className:"dsn-rich-text-editor-toolbar-icon",disabled:M,"aria-label":"Insert emoji",onClick:()=>j("🙂"),children:h.jsx(MC,{size:16,"aria-hidden":"true"})})]}),l&&h.jsxs("div",{className:"dsn-rich-text-editor-footer",children:[h.jsx(Xn,{className:"dsn-rich-text-editor-footer-checkbox",label:o,checked:s,disabled:M,showTrailingIcon:!1,showDescription:!1,onCheckedChange:m}),h.jsxs("div",{className:"dsn-rich-text-editor-footer-actions",children:[h.jsx(we,{variant:"ghost",size:"md",disabled:M,onClick:d,children:u}),h.jsx(we,{variant:"primary",size:"md",disabled:M,onClick:f,children:c})]})]})]})}function J2({id:e,label:t="Label",placeholder:n="Type here...",value:r,defaultValue:i,disabled:a=!1,readOnly:s=!1,error:o=!1,helperText:l="Help text",errorMessage:u="There is an issue with this content.",maxLength:c,attachments:d=[],footerChecked:f=!1,footerLabel:g="Label",showFooter:p=!0,cancelLabel:m="Cancel",confirmLabel:v="Confirm",onChange:x,onFooterCheckedChange:y,onCancel:b,onConfirm:k,onAttachmentRemove:w,onAddAttachment:S,className:N,"aria-label":E,"aria-labelledby":T}){const C=_.useId(),O=e??`dsn-rich-text-editor-${C}`,$=`${O}-label`,M=`${O}-help`,[j,P]=_.useState(Oo(i)),[F,B]=_.useState(H1(Oo(r??i)).length),W=r!==void 0?Oo(r):j,q=o?u:l,D=c!==void 0&&F>c,A=_.useMemo(()=>({namespace:O,editable:!(a||s),theme:{paragraph:"dsn-rich-text-editor-paragraph",text:{bold:"dsn-rich-text-editor-text-bold",italic:"dsn-rich-text-editor-text-italic",underline:"dsn-rich-text-editor-text-underline",strikethrough:"dsn-rich-text-editor-text-strikethrough",code:"dsn-rich-text-editor-text-code"},heading:{h2:"dsn-rich-text-editor-heading-h2"},quote:"dsn-rich-text-editor-quote",code:"dsn-rich-text-editor-code",link:"dsn-rich-text-editor-link",list:{ul:"dsn-rich-text-editor-list-ul",ol:"dsn-rich-text-editor-list-ol",listitem:"dsn-rich-text-editor-list-item"}},editorState:U=>{const G=new DOMParser().parseFromString(W,"text/html"),J=Ch(U,G),R=lt();R.clear(),J.length>0?R.append(...J):R.append(tt())},onError:U=>{throw U},nodes:[So,ko,No,ds,fs,Ih,jo]}),[a,O,W,s]);return h.jsxs("div",{className:["dsn-rich-text-editor",N].filter(Boolean).join(" "),"data-error":o||void 0,"data-disabled":a||void 0,"data-readonly":s||void 0,"data-over-limit":D||void 0,children:[t&&h.jsx("label",{id:$,className:"dsn-rich-text-editor-label",htmlFor:O,children:t}),h.jsx("div",{className:"dsn-rich-text-editor-shell",children:h.jsx(g$,{initialConfig:A,children:h.jsx(X2,{id:O,editorValue:W,placeholder:n,disabled:a,readOnly:s,attachments:d,footerChecked:f,footerLabel:g,showFooter:p,cancelLabel:m,confirmLabel:v,onCancel:b,onConfirm:k,onAttachmentRemove:w,onAddAttachment:S,onFooterCheckedChange:y,onCharacterCountChange:B,onHtmlChange:U=>{r===void 0&&P(U),x==null||x(U)},labelledBy:T??(t?$:void 0),ariaLabel:E,describedBy:q?M:void 0})})}),(q||c!==void 0)&&h.jsxs("div",{className:"dsn-rich-text-editor-meta",children:[h.jsxs("div",{className:"dsn-rich-text-editor-meta-main",children:[h.jsx("span",{className:"dsn-rich-text-editor-meta-icon","aria-hidden":"true",children:h.jsx(vC,{size:16})}),q&&h.jsx("p",{id:M,className:"dsn-rich-text-editor-help",children:q})]}),c!==void 0&&h.jsxs("span",{className:"dsn-rich-text-editor-count","aria-live":"polite","aria-atomic":"true",children:[F,"/",c]})]})]})}const Z2=[{value:"first",label:"Label"},{value:"second",label:"Label"}],Q2=Array.from({length:4},(e,t)=>({id:`simple-item-${t+1}`,kind:"menu-cell",props:{label:"Label",showLeadingIcon:!0,showTrailingIcon:!1}}));function eP({variant:e="rich",title:t="Title",showHeader:n=!0,showSegmentControl:r=!1,segmentControlOptions:i=Z2,segmentControlProps:a,showSearch:s=!1,searchProps:o,choiceLists:l,simpleItems:u=Q2,showBottomBar:c=!1,bottomBarLeftActions:d,bottomBarRightActions:f,className:g,"aria-label":p="Popover menu",onEscape:m}){const v=["dsn-popover-menu",g].filter(Boolean).join(" "),x=l??(e==="simple"?[{id:"simple-choice-list",showHeader:!1,showSectionHeaders:!1,sections:[{id:"simple-section",title:"Actions",items:u}]}]:[]);return h.jsx(Fr,{className:v,role:"menu","aria-label":p,header:n?h.jsx(Rr,{title:t,size:"medium"}):void 0,segment:r?h.jsx("div",{className:"dsn-popover-menu-segment",children:h.jsx(tf,{options:i,...a})}):void 0,search:s?h.jsx("div",{className:"dsn-popover-menu-search",children:h.jsx(Vy,{variant:"ghost",placeholder:"Search","aria-label":"Search",...o})}):void 0,content:h.jsx("div",{className:"dsn-popover-menu-lists","data-variant":e,children:x.map(y=>h.jsx(e0,{title:y.title,description:y.description,showHeader:y.showHeader,showSectionHeaders:y.showSectionHeaders,sections:y.sections,className:"dsn-popover-menu-choice-list",enableMenuKeyboardNavigation:!0,onMenuEscape:m},y.id))}),bottomBar:c?h.jsx(Da,{size:"md",className:"dsn-popover-menu-bottom-bar",leftActions:d,rightActions:f??h.jsxs(Fi,{size:"md",spaceBetween:!0,"aria-label":"Popover actions",children:[h.jsx(we,{variant:"ghost",size:"md",children:"Cancel"}),h.jsx(we,{variant:"primary",size:"md",children:"Confirm"})]})}):void 0})}const q1='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function tP({open:e,defaultOpen:t=!1,onOpenChange:n,onClose:r,closeOnOverlayClick:i=!0,closeOnEscape:a=!0,title:s="Title",description:o,showHeader:l=!0,headerSize:u="large",headerLeadingControl:c,headerTrailingControl:d,showCloseButton:f=!0,header:g,children:p,showBottomBar:m=!0,bottomBarSize:v="lg",bottomBarLeftActions:x,bottomBarRightActions:y,bottomBar:b,cancelLabel:k="Cancel",confirmLabel:w="Confirm",onCancel:S,onConfirm:N,className:E,"aria-label":T="Modal","aria-describedby":C}){const O=_.useId(),$=e!==void 0,[M,j]=_.useState(t),P=$?e:M,F=_.useRef(null),B=_.useRef(null),W=_.useRef(P),q=()=>{$||j(!1),n==null||n(!1),r==null||r()};if(_.useEffect(()=>{var J;const G=W.current;P&&!G&&(B.current=document.activeElement),!P&&G&&((J=B.current)==null||J.focus()),W.current=P},[P]),_.useEffect(()=>{if(!P)return;const G=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=G}},[P]),_.useEffect(()=>{if(!P||!F.current)return;const J=F.current.querySelectorAll(q1)[0];J?J.focus():F.current.focus()},[P]),_.useEffect(()=>{if(!P)return;const G=J=>{if(J.key==="Escape"&&a){J.preventDefault(),q();return}if(J.key!=="Tab"||!F.current)return;const R=Array.from(F.current.querySelectorAll(q1));if(R.length===0){J.preventDefault(),F.current.focus();return}const K=R[0],Z=R[R.length-1],z=document.activeElement;!J.shiftKey&&z===Z?(J.preventDefault(),K.focus()):J.shiftKey&&z===K&&(J.preventDefault(),Z.focus())};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[a,P]),!P)return null;const D=["dsn-modal",E].filter(Boolean).join(" "),A=f?h.jsx(we,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Dr,{size:16}),"aria-label":"Close modal",onClick:q}):void 0,U=g??h.jsx(Rr,{title:s,description:o,size:u,leadingControl:c,trailingControl:d??A,className:"dsn-modal-title"}),Y=b??h.jsx(Da,{size:v,leftActions:x,rightActions:y??h.jsxs(h.Fragment,{children:[h.jsx(we,{variant:"ghost",size:"md",onClick:S??q,children:k}),h.jsx(we,{variant:"primary",size:"md",onClick:N,children:w})]}),"aria-label":"Modal actions"});return xn.createPortal(h.jsxs("div",{className:"dsn-modal-overlay",onMouseDown:G=>{G.target===G.currentTarget&&i&&q()},children:[h.jsx("div",{className:"dsn-modal-backdrop","aria-hidden":"true"}),h.jsxs("div",{className:D,role:"dialog","aria-modal":"true","aria-label":l&&!g?void 0:T,"aria-labelledby":l&&!g?O:void 0,"aria-describedby":C,ref:F,tabIndex:-1,children:[l&&U?h.jsx("div",{className:"dsn-modal-header",children:U}):null,l&&!g?h.jsx("h2",{id:O,className:"dsn-modal-title-assistive",children:s}):null,h.jsx("div",{className:"dsn-modal-content",children:p}),m?h.jsx("div",{className:"dsn-modal-bottom-bar",children:Y}):null]})]}),document.body)}const V1='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])',nP=200;function rP({variant:e="overlay",placement:t="right",open:n,defaultOpen:r,onOpenChange:i,onClose:a,closeOnOverlayClick:s=!0,closeOnEscape:o=!0,width:l="var(--size-surface-popover-width-large, 320px)",title:u="Title",description:c,showHeader:d=!0,headerSize:f=e==="stacked"?"medium":"large",headerLeadingControl:g,headerTrailingControl:p,showCloseButton:m=!0,showToggle:v=!1,toggleChecked:x=!1,onToggleChange:y,toggleAriaLabel:b="Toggle drawer option",header:k,children:w,showBottomBar:S=!0,bottomBarSize:N=e==="stacked"?"md":"lg",bottomBarLeftActions:E,bottomBarRightActions:T,bottomBar:C,cancelLabel:O="Cancel",confirmLabel:$="Confirm",onCancel:M,onConfirm:j,className:P,"aria-label":F="Drawer","aria-describedby":B}){const W=n!==void 0,[q,D]=_.useState(r??e==="stacked"),A=W?n:q,[U,Y]=_.useState(A),[G,J]=_.useState(!1),R=_.useId(),K=_.useRef(null),Z=_.useRef(null),z=_.useRef(A),X=()=>{W||D(!1),i==null||i(!1),a==null||a()};if(_.useEffect(()=>{var xe;if(e!=="overlay")return;const fe=z.current;A&&!fe&&(Z.current=document.activeElement),!A&&fe&&((xe=Z.current)==null||xe.focus()),z.current=A},[A,e]),_.useEffect(()=>{if(e!=="overlay"||!U)return;const fe=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=fe}},[U,e]),_.useEffect(()=>{if(e!=="overlay"){Y(A),J(!1);return}if(A){Y(!0),J(!1);return}if(!U)return;J(!0);const fe=window.setTimeout(()=>{Y(!1),J(!1)},nP);return()=>window.clearTimeout(fe)},[A,U,e]),_.useEffect(()=>{if(e!=="overlay"||!A||!K.current)return;const xe=K.current.querySelectorAll(V1)[0];xe?xe.focus():K.current.focus()},[A,e]),_.useEffect(()=>{if(e!=="overlay"||!A)return;const fe=xe=>{if(xe.key==="Escape"&&o){xe.preventDefault(),X();return}if(xe.key!=="Tab"||!K.current)return;const Se=Array.from(K.current.querySelectorAll(V1));if(Se.length===0){xe.preventDefault(),K.current.focus();return}const We=Se[0],Ze=Se[Se.length-1],Nt=document.activeElement;!xe.shiftKey&&Nt===Ze?(xe.preventDefault(),We.focus()):xe.shiftKey&&Nt===We&&(xe.preventDefault(),Ze.focus())};return document.addEventListener("keydown",fe),()=>document.removeEventListener("keydown",fe)},[o,A,e]),e==="overlay"&&!U||e==="stacked"&&!A)return null;const H=["dsn-drawer",P].filter(Boolean).join(" "),I=h.jsxs("div",{className:"dsn-drawer-header-controls",children:[v?h.jsx(La,{checked:x,onChange:y,size:"md","aria-label":b}):null,m?h.jsx(we,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Dr,{size:16}),"aria-label":"Close drawer",onClick:X}):null]}),ne=k??h.jsx(Rr,{title:u,description:c,size:f,leadingControl:g,trailingControl:p??I,className:"dsn-drawer-title"}),ue=C??h.jsx(Da,{size:N,leftActions:E,rightActions:T??h.jsxs(h.Fragment,{children:[h.jsx(we,{variant:"ghost",size:"md",onClick:M??X,children:O}),h.jsx(we,{variant:"primary",size:"md",onClick:j,children:$})]}),"aria-label":"Drawer actions"}),ye=h.jsxs("div",{className:H,"data-variant":e,"data-placement":t,style:{width:l},ref:K,role:e==="overlay"?"dialog":"complementary","aria-modal":e==="overlay"?!0:void 0,"aria-label":d&&!k?void 0:F,"aria-labelledby":d&&!k?R:void 0,"aria-describedby":B,tabIndex:e==="overlay"?-1:void 0,children:[d&&ne?h.jsx("div",{className:"dsn-drawer-header",children:ne}):null,d&&!k?h.jsx("h2",{id:R,className:"dsn-drawer-title-assistive",children:u}):null,h.jsx("div",{className:"dsn-drawer-content",children:w}),S?h.jsx("div",{className:"dsn-drawer-bottom-bar",children:ue}):null]});return e==="stacked"?ye:xn.createPortal(h.jsxs("div",{className:"dsn-drawer-overlay","data-placement":t,"data-state":G?"closing":"open",onMouseDown:fe=>{fe.target===fe.currentTarget&&s&&X()},children:[h.jsx("div",{className:"dsn-drawer-backdrop","aria-hidden":"true"}),ye]}),document.body)}const K1='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';function iP({open:e,defaultOpen:t=!1,onOpenChange:n,onClose:r,closeOnOverlayClick:i=!0,closeOnEscape:a=!0,variant:s="default",title:o="Title",message:l="Message",confirmLabel:u=s==="danger"?"Delete":"Confirm",cancelLabel:c="Cancel",onConfirm:d,onCancel:f,requireAcknowledgement:g=!1,acknowledgementLabel:p="Confirm",acknowledgementChecked:m,defaultAcknowledgementChecked:v=!1,onAcknowledgementChange:x,className:y,"aria-label":b="Alert dialog"}){const k=e!==void 0,[w,S]=_.useState(t),N=k?e:w,E=m!==void 0,[T,C]=_.useState(v),O=E?m:T,$=_.useId(),M=_.useId(),j=_.useRef(null),P=_.useRef(null),F=_.useRef(N),B=()=>{k||S(!1),n==null||n(!1),r==null||r()},W=A=>{E||C(A),x==null||x(A)};if(_.useEffect(()=>{var U;const A=F.current;N&&!A&&(P.current=document.activeElement),!N&&A&&((U=P.current)==null||U.focus()),F.current=N},[N]),_.useEffect(()=>{if(!N)return;const A=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=A}},[N]),_.useEffect(()=>{if(!N||!j.current)return;const U=j.current.querySelectorAll(K1)[0];U?U.focus():j.current.focus()},[N]),_.useEffect(()=>{if(!N)return;const A=U=>{if(U.key==="Escape"&&a){U.preventDefault(),B();return}if(U.key!=="Tab"||!j.current)return;const Y=Array.from(j.current.querySelectorAll(K1));if(Y.length===0){U.preventDefault(),j.current.focus();return}const G=Y[0],J=Y[Y.length-1],R=document.activeElement;!U.shiftKey&&R===J?(U.preventDefault(),G.focus()):U.shiftKey&&R===G&&(U.preventDefault(),J.focus())};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[a,N]),!N)return null;const q=g&&!O,D=["dsn-alert-dialog",y].filter(Boolean).join(" ");return xn.createPortal(h.jsxs("div",{className:"dsn-alert-dialog-overlay",onMouseDown:A=>{A.target===A.currentTarget&&i&&B()},children:[h.jsx("div",{className:"dsn-alert-dialog-backdrop","aria-hidden":"true"}),h.jsxs("div",{className:D,"data-variant":s,ref:j,role:"alertdialog","aria-modal":"true","aria-label":b,"aria-labelledby":$,"aria-describedby":M,tabIndex:-1,children:[h.jsxs("div",{className:"dsn-alert-dialog-content",children:[h.jsx("h2",{id:$,className:"dsn-alert-dialog-title",children:o}),h.jsx("p",{id:M,className:"dsn-alert-dialog-message",children:l})]}),h.jsxs("div",{className:"dsn-alert-dialog-footer",children:[h.jsx("div",{className:"dsn-alert-dialog-footer-left",children:g?h.jsx(Xn,{size:"md",checked:O,onCheckedChange:W,label:p,showTrailingIcon:!1,"aria-label":p}):null}),h.jsxs("div",{className:"dsn-alert-dialog-footer-right",children:[h.jsx(we,{variant:"ghost",size:"md",onClick:f??B,children:c}),h.jsx(we,{variant:"primary",size:"md",destructive:s==="danger",disabled:q,onClick:d,children:u})]})]})]})]}),document.body)}function Y1(e,t,n){let r=e;return typeof t=="number"&&(r=Math.max(r,t)),typeof n=="number"&&(r=Math.min(r,n)),r}function aP({columns:e,rows:t,columnOrder:n,onColumnOrderChange:r,selectedRowIds:i=[],onSelectedRowIdsChange:a,sortState:s=null,onSortStateChange:o,className:l,"aria-label":u="Data table"}){const c=["dsn-data-table",l].filter(Boolean).join(" "),[d,f]=_.useState(null),[g,p]=_.useState(null),[m,v]=_.useState({}),[x,y]=_.useState(null),[b,k]=_.useState(null),w=_.useRef(null),S=_.useMemo(()=>new Map(e.map(R=>[R.id,R])),[e]),N=_.useMemo(()=>e.map(R=>R.id),[e]),E=_.useMemo(()=>{if(!(n!=null&&n.length))return N;const R=n.filter(Z=>S.has(Z)),K=N.filter(Z=>!R.includes(Z));return[...R,...K]},[n,N,S]),T=_.useMemo(()=>{var K;return((K=e.find(Z=>Z.frozen))==null?void 0:K.id)??N[0]},[e,N]),O=_.useMemo(()=>{const R=E.filter(K=>K!==T);return[T,...R]},[E,T]).map(R=>S.get(R)).filter(R=>!!R),$=_.useMemo(()=>O.find(R=>R.fieldType==="checkbox"||R.headerVariant==="checkbox"),[O]),M=_.useMemo(()=>$?O.filter(R=>R.id!==$.id):O,[O,$]),j=_.useMemo(()=>M.map(R=>R.id),[M]),P=_.useMemo(()=>j.slice(0,1),[j]),F=(R,K)=>{const Z=new Set(i);K?Z.add(R):Z.delete(R),a==null||a(Array.from(Z))},B=R=>{a==null||a(R?t.map(K=>K.id):[])},W=(R,K)=>{if(P.includes(R)||P.includes(K)||R===K)return;const Z=[...j],z=Z.indexOf(R),X=Z.indexOf(K);if(z===-1||X===-1)return;const[H]=Z.splice(z,1);Z.splice(X,0,H),r==null||r($?[$.id,...Z]:Z)},q=(R,K)=>{if(P.includes(R))return;const Z=j.filter(ne=>!P.includes(ne)),z=Z.indexOf(R);if(z===-1)return;const X=K==="left"?z-1:z+1;if(X<0||X>=Z.length)return;const H=[...Z],[I]=H.splice(z,1);H.splice(X,0,I),r==null||r($?[$.id,...P,...H]:[...P,...H])},D=(R,K)=>{const z=m[R.id]??R.width??160,H=Y1(z+(K==="increase"?16:-16),R.minWidth,R.maxWidth);v(I=>({...I,[R.id]:H}))},A=(R,K)=>{var z,X;const Z=m[K.id]??K.width??160;w.current={columnId:K.id,startX:R.clientX,startWidth:Z,minWidth:K.minWidth,maxWidth:K.maxWidth},y(K.id),k(R.pointerId),(X=(z=R.currentTarget).setPointerCapture)==null||X.call(z,R.pointerId),R.preventDefault()};_.useEffect(()=>{if(!x)return;const R=I=>{if(!w.current)return;const{columnId:ne,startX:ue,startWidth:ye,minWidth:fe,maxWidth:xe}=w.current,Se=I-ue,We=Y1(ye+Se,fe,xe);v(Ze=>({...Ze,[ne]:We}))},K=I=>{R(I.clientX)},Z=I=>{R(I.clientX)},z=()=>{w.current=null,y(null),k(null)},X=I=>{b!=null&&I.pointerId!==b||z()},H=I=>{b!=null&&I.pointerId!==b||z()};return window.addEventListener("pointermove",K),window.addEventListener("pointerup",X),window.addEventListener("pointercancel",H),window.addEventListener("mousemove",Z),window.addEventListener("mouseup",z),()=>{window.removeEventListener("pointermove",K),window.removeEventListener("pointerup",X),window.removeEventListener("pointercancel",H),window.removeEventListener("mousemove",Z),window.removeEventListener("mouseup",z)}},[b,x]);const U=(R,K)=>{if(K==="none"){o==null||o(null);return}o==null||o({columnId:R,direction:K})},Y=t.filter(R=>i.includes(R.id)).length,G=t.length>0&&Y===t.length,J=Y>0&&Y<t.length;return h.jsx("div",{className:c,"data-resizing":x?"":void 0,children:h.jsxs("table",{className:"dsn-data-table-table",role:"table","aria-label":u,children:[h.jsx("colgroup",{children:M.map(R=>{const K=m[R.id]??R.width,Z={};return R.widthMode==="fixed"&&typeof K=="number"?(Z.width=`${K}px`,Z.minWidth=`${K}px`,Z.maxWidth=`${K}px`):R.widthMode==="hug"&&(Z.width="1%"),h.jsx("col",{style:Z},R.id)})}),h.jsx("thead",{children:h.jsx("tr",{children:M.map((R,K)=>{const Z=K<1,z=(s==null?void 0:s.columnId)===R.id?s.direction:"none",X=Z?{left:"0px"}:void 0;return h.jsx("th",{scope:"col",className:Z?"dsn-data-table-sticky-column":void 0,"data-first-column":K===0||void 0,style:X,"data-drag-over":g===R.id?"":void 0,onDragOver:H=>{d&&(P.includes(R.id)||R.id!==d&&(H.preventDefault(),p(R.id)))},onDragLeave:()=>{g===R.id&&p(null)},onDrop:H=>{H.preventDefault(),d&&(W(d,R.id),f(null),p(null))},children:h.jsx(Xy,{variant:"title",label:R.header,sortable:!!R.sortable,sortDirection:z,reorderable:!Z&&R.reorderable!==!1,resizable:!Z,checkboxChecked:G,checkboxIndeterminate:J,onCheckboxChange:B,leadingAccessory:$&&K===0?h.jsx(Xn,{size:"sm",checked:G,indeterminate:J,showContent:!1,"aria-label":"Select all rows",onCheckedChange:B}):void 0,onSortChange:H=>U(R.id,H),onReorderCommand:H=>q(R.id,H),onResizeCommand:H=>D(R,H),onResizePointerDown:H=>A(H,R),onReorderDragStart:H=>{if(H.stopPropagation(),P.includes(R.id)||R.reorderable===!1){H.preventDefault();return}H.dataTransfer.effectAllowed="move",H.dataTransfer.setData("text/plain",R.id),f(R.id)},onReorderDragEnd:()=>{f(null),p(null)}})},R.id)})})}),h.jsx("tbody",{children:t.map(R=>h.jsx("tr",{children:M.map((K,Z)=>{const z=Z<1,X=z?{left:"0px"}:void 0,H=R.cells[K.id],I=i.includes(R.id);return h.jsx("td",{className:z?"dsn-data-table-sticky-column dsn-data-table-sticky-cell":void 0,"data-first-column":Z===0||void 0,style:X,children:h.jsx(Zy,{fieldType:K.fieldType,value:H,leadingAccessory:$&&Z===0?h.jsx(Xn,{size:"sm",checked:I,showContent:!1,"aria-label":I?"Selected row":"Unselected row",onCheckedChange:ne=>F(R.id,ne)}):void 0,align:K.align,"aria-label":`${K.header} value`})},`${R.id}-${K.id}`)})},R.id))})]})})}function G1({showHeader:e=!0,title:t="Title",description:n,headerSize:r="large",headerLeadingControl:i,headerTrailingControl:a,header:s,children:o,showBottomBar:l=!1,bottomBarSize:u="lg",bottomBarLeftActions:c,bottomBarRightActions:d,bottomBar:f,className:g,"aria-label":p="Card"}){const m=["dsn-card",g].filter(Boolean).join(" "),v=s??h.jsx(Rr,{title:t,description:n,size:r,leadingControl:i,trailingControl:a}),x=f??h.jsx(Da,{size:u,leftActions:c,rightActions:d,"aria-label":"Card actions"});return h.jsxs("section",{className:m,"aria-label":p,children:[e&&v?h.jsx("div",{className:"dsn-card-header",children:v}):null,h.jsx("div",{className:"dsn-card-content",children:o}),l?h.jsx("div",{className:"dsn-card-bottom-bar",children:x}):null]})}var Uh={exports:{}},Yu={exports:{}},He={};/** @license React v16.13.1
295
+ * react-is.production.min.js
296
+ *
297
+ * Copyright (c) Facebook, Inc. and its affiliates.
298
+ *
299
+ * This source code is licensed under the MIT license found in the
300
+ * LICENSE file in the root directory of this source tree.
301
+ */var X1;function sP(){if(X1)return He;X1=1;var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(w){if(typeof w=="object"&&w!==null){var S=w.$$typeof;switch(S){case t:switch(w=w.type,w){case l:case u:case r:case a:case i:case d:return w;default:switch(w=w&&w.$$typeof,w){case o:case c:case p:case g:case s:return w;default:return S}}case n:return S}}}function k(w){return b(w)===u}return He.AsyncMode=l,He.ConcurrentMode=u,He.ContextConsumer=o,He.ContextProvider=s,He.Element=t,He.ForwardRef=c,He.Fragment=r,He.Lazy=p,He.Memo=g,He.Portal=n,He.Profiler=a,He.StrictMode=i,He.Suspense=d,He.isAsyncMode=function(w){return k(w)||b(w)===l},He.isConcurrentMode=k,He.isContextConsumer=function(w){return b(w)===o},He.isContextProvider=function(w){return b(w)===s},He.isElement=function(w){return typeof w=="object"&&w!==null&&w.$$typeof===t},He.isForwardRef=function(w){return b(w)===c},He.isFragment=function(w){return b(w)===r},He.isLazy=function(w){return b(w)===p},He.isMemo=function(w){return b(w)===g},He.isPortal=function(w){return b(w)===n},He.isProfiler=function(w){return b(w)===a},He.isStrictMode=function(w){return b(w)===i},He.isSuspense=function(w){return b(w)===d},He.isValidElementType=function(w){return typeof w=="string"||typeof w=="function"||w===r||w===u||w===a||w===i||w===d||w===f||typeof w=="object"&&w!==null&&(w.$$typeof===p||w.$$typeof===g||w.$$typeof===s||w.$$typeof===o||w.$$typeof===c||w.$$typeof===v||w.$$typeof===x||w.$$typeof===y||w.$$typeof===m)},He.typeOf=b,He}var qe={};/** @license React v16.13.1
302
+ * react-is.development.js
303
+ *
304
+ * Copyright (c) Facebook, Inc. and its affiliates.
305
+ *
306
+ * This source code is licensed under the MIT license found in the
307
+ * LICENSE file in the root directory of this source tree.
308
+ */var J1;function oP(){return J1||(J1=1,process.env.NODE_ENV!=="production"&&function(){var e=typeof Symbol=="function"&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,i=e?Symbol.for("react.strict_mode"):60108,a=e?Symbol.for("react.profiler"):60114,s=e?Symbol.for("react.provider"):60109,o=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,u=e?Symbol.for("react.concurrent_mode"):60111,c=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,f=e?Symbol.for("react.suspense_list"):60120,g=e?Symbol.for("react.memo"):60115,p=e?Symbol.for("react.lazy"):60116,m=e?Symbol.for("react.block"):60121,v=e?Symbol.for("react.fundamental"):60117,x=e?Symbol.for("react.responder"):60118,y=e?Symbol.for("react.scope"):60119;function b(I){return typeof I=="string"||typeof I=="function"||I===r||I===u||I===a||I===i||I===d||I===f||typeof I=="object"&&I!==null&&(I.$$typeof===p||I.$$typeof===g||I.$$typeof===s||I.$$typeof===o||I.$$typeof===c||I.$$typeof===v||I.$$typeof===x||I.$$typeof===y||I.$$typeof===m)}function k(I){if(typeof I=="object"&&I!==null){var ne=I.$$typeof;switch(ne){case t:var ue=I.type;switch(ue){case l:case u:case r:case a:case i:case d:return ue;default:var ye=ue&&ue.$$typeof;switch(ye){case o:case c:case p:case g:case s:return ye;default:return ne}}case n:return ne}}}var w=l,S=u,N=o,E=s,T=t,C=c,O=r,$=p,M=g,j=n,P=a,F=i,B=d,W=!1;function q(I){return W||(W=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(I)||k(I)===l}function D(I){return k(I)===u}function A(I){return k(I)===o}function U(I){return k(I)===s}function Y(I){return typeof I=="object"&&I!==null&&I.$$typeof===t}function G(I){return k(I)===c}function J(I){return k(I)===r}function R(I){return k(I)===p}function K(I){return k(I)===g}function Z(I){return k(I)===n}function z(I){return k(I)===a}function X(I){return k(I)===i}function H(I){return k(I)===d}qe.AsyncMode=w,qe.ConcurrentMode=S,qe.ContextConsumer=N,qe.ContextProvider=E,qe.Element=T,qe.ForwardRef=C,qe.Fragment=O,qe.Lazy=$,qe.Memo=M,qe.Portal=j,qe.Profiler=P,qe.StrictMode=F,qe.Suspense=B,qe.isAsyncMode=q,qe.isConcurrentMode=D,qe.isContextConsumer=A,qe.isContextProvider=U,qe.isElement=Y,qe.isForwardRef=G,qe.isFragment=J,qe.isLazy=R,qe.isMemo=K,qe.isPortal=Z,qe.isProfiler=z,qe.isStrictMode=X,qe.isSuspense=H,qe.isValidElementType=b,qe.typeOf=k}()),qe}var Z1;function Q1(){return Z1||(Z1=1,process.env.NODE_ENV==="production"?Yu.exports=sP():Yu.exports=oP()),Yu.exports}/*
309
+ object-assign
310
+ (c) Sindre Sorhus
311
+ @license MIT
312
+ */var Hh,e_;function lP(){if(e_)return Hh;e_=1;var e=Object.getOwnPropertySymbols,t=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;function r(a){if(a==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(a)}function i(){try{if(!Object.assign)return!1;var a=new String("abc");if(a[5]="de",Object.getOwnPropertyNames(a)[0]==="5")return!1;for(var s={},o=0;o<10;o++)s["_"+String.fromCharCode(o)]=o;var l=Object.getOwnPropertyNames(s).map(function(c){return s[c]});if(l.join("")!=="0123456789")return!1;var u={};return"abcdefghijklmnopqrst".split("").forEach(function(c){u[c]=c}),Object.keys(Object.assign({},u)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}return Hh=i()?Object.assign:function(a,s){for(var o,l=r(a),u,c=1;c<arguments.length;c++){o=Object(arguments[c]);for(var d in o)t.call(o,d)&&(l[d]=o[d]);if(e){u=e(o);for(var f=0;f<u.length;f++)n.call(o,u[f])&&(l[u[f]]=o[u[f]])}}return l},Hh}var qh,t_;function Vh(){if(t_)return qh;t_=1;var e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";return qh=e,qh}var Kh,n_;function r_(){return n_||(n_=1,Kh=Function.call.bind(Object.prototype.hasOwnProperty)),Kh}var Yh,i_;function uP(){if(i_)return Yh;i_=1;var e=function(){};if(process.env.NODE_ENV!=="production"){var t=Vh(),n={},r=r_();e=function(a){var s="Warning: "+a;typeof console<"u"&&console.error(s);try{throw new Error(s)}catch{}}}function i(a,s,o,l,u){if(process.env.NODE_ENV!=="production"){for(var c in a)if(r(a,c)){var d;try{if(typeof a[c]!="function"){var f=Error((l||"React class")+": "+o+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw f.name="Invariant Violation",f}d=a[c](s,c,l,o,null,t)}catch(p){d=p}if(d&&!(d instanceof Error)&&e((l||"React class")+": type specification of "+o+" `"+c+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+typeof d+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."),d instanceof Error&&!(d.message in n)){n[d.message]=!0;var g=u?u():"";e("Failed "+o+" type: "+d.message+(g??""))}}}}return i.resetWarningCache=function(){process.env.NODE_ENV!=="production"&&(n={})},Yh=i,Yh}var Gh,a_;function cP(){if(a_)return Gh;a_=1;var e=Q1(),t=lP(),n=Vh(),r=r_(),i=uP(),a=function(){};process.env.NODE_ENV!=="production"&&(a=function(o){var l="Warning: "+o;typeof console<"u"&&console.error(l);try{throw new Error(l)}catch{}});function s(){return null}return Gh=function(o,l){var u=typeof Symbol=="function"&&Symbol.iterator,c="@@iterator";function d(D){var A=D&&(u&&D[u]||D[c]);if(typeof A=="function")return A}var f="<<anonymous>>",g={array:x("array"),bigint:x("bigint"),bool:x("boolean"),func:x("function"),number:x("number"),object:x("object"),string:x("string"),symbol:x("symbol"),any:y(),arrayOf:b,element:k(),elementType:w(),instanceOf:S,node:C(),objectOf:E,oneOf:N,oneOfType:T,shape:$,exact:M};function p(D,A){return D===A?D!==0||1/D===1/A:D!==D&&A!==A}function m(D,A){this.message=D,this.data=A&&typeof A=="object"?A:{},this.stack=""}m.prototype=Error.prototype;function v(D){if(process.env.NODE_ENV!=="production")var A={},U=0;function Y(J,R,K,Z,z,X,H){if(Z=Z||f,X=X||K,H!==n){if(l){var I=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");throw I.name="Invariant Violation",I}else if(process.env.NODE_ENV!=="production"&&typeof console<"u"){var ne=Z+":"+K;!A[ne]&&U<3&&(a("You are manually calling a React.PropTypes validation function for the `"+X+"` prop on `"+Z+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),A[ne]=!0,U++)}}return R[K]==null?J?R[K]===null?new m("The "+z+" `"+X+"` is marked as required "+("in `"+Z+"`, but its value is `null`.")):new m("The "+z+" `"+X+"` is marked as required in "+("`"+Z+"`, but its value is `undefined`.")):null:D(R,K,Z,z,X)}var G=Y.bind(null,!1);return G.isRequired=Y.bind(null,!0),G}function x(D){function A(U,Y,G,J,R,K){var Z=U[Y],z=F(Z);if(z!==D){var X=B(Z);return new m("Invalid "+J+" `"+R+"` of type "+("`"+X+"` supplied to `"+G+"`, expected ")+("`"+D+"`."),{expectedType:D})}return null}return v(A)}function y(){return v(s)}function b(D){function A(U,Y,G,J,R){if(typeof D!="function")return new m("Property `"+R+"` of component `"+G+"` has invalid PropType notation inside arrayOf.");var K=U[Y];if(!Array.isArray(K)){var Z=F(K);return new m("Invalid "+J+" `"+R+"` of type "+("`"+Z+"` supplied to `"+G+"`, expected an array."))}for(var z=0;z<K.length;z++){var X=D(K,z,G,J,R+"["+z+"]",n);if(X instanceof Error)return X}return null}return v(A)}function k(){function D(A,U,Y,G,J){var R=A[U];if(!o(R)){var K=F(R);return new m("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+Y+"`, expected a single ReactElement."))}return null}return v(D)}function w(){function D(A,U,Y,G,J){var R=A[U];if(!e.isValidElementType(R)){var K=F(R);return new m("Invalid "+G+" `"+J+"` of type "+("`"+K+"` supplied to `"+Y+"`, expected a single ReactElement type."))}return null}return v(D)}function S(D){function A(U,Y,G,J,R){if(!(U[Y]instanceof D)){var K=D.name||f,Z=q(U[Y]);return new m("Invalid "+J+" `"+R+"` of type "+("`"+Z+"` supplied to `"+G+"`, expected ")+("instance of `"+K+"`."))}return null}return v(A)}function N(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&(arguments.length>1?a("Invalid arguments supplied to oneOf, expected an array, got "+arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):a("Invalid argument supplied to oneOf, expected an array.")),s;function A(U,Y,G,J,R){for(var K=U[Y],Z=0;Z<D.length;Z++)if(p(K,D[Z]))return null;var z=JSON.stringify(D,function(H,I){var ne=B(I);return ne==="symbol"?String(I):I});return new m("Invalid "+J+" `"+R+"` of value `"+String(K)+"` "+("supplied to `"+G+"`, expected one of "+z+"."))}return v(A)}function E(D){function A(U,Y,G,J,R){if(typeof D!="function")return new m("Property `"+R+"` of component `"+G+"` has invalid PropType notation inside objectOf.");var K=U[Y],Z=F(K);if(Z!=="object")return new m("Invalid "+J+" `"+R+"` of type "+("`"+Z+"` supplied to `"+G+"`, expected an object."));for(var z in K)if(r(K,z)){var X=D(K,z,G,J,R+"."+z,n);if(X instanceof Error)return X}return null}return v(A)}function T(D){if(!Array.isArray(D))return process.env.NODE_ENV!=="production"&&a("Invalid argument supplied to oneOfType, expected an instance of array."),s;for(var A=0;A<D.length;A++){var U=D[A];if(typeof U!="function")return a("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+W(U)+" at index "+A+"."),s}function Y(G,J,R,K,Z){for(var z=[],X=0;X<D.length;X++){var H=D[X],I=H(G,J,R,K,Z,n);if(I==null)return null;I.data&&r(I.data,"expectedType")&&z.push(I.data.expectedType)}var ne=z.length>0?", expected one of type ["+z.join(", ")+"]":"";return new m("Invalid "+K+" `"+Z+"` supplied to "+("`"+R+"`"+ne+"."))}return v(Y)}function C(){function D(A,U,Y,G,J){return j(A[U])?null:new m("Invalid "+G+" `"+J+"` supplied to "+("`"+Y+"`, expected a ReactNode."))}return v(D)}function O(D,A,U,Y,G){return new m((D||"React class")+": "+A+" type `"+U+"."+Y+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+G+"`.")}function $(D){function A(U,Y,G,J,R){var K=U[Y],Z=F(K);if(Z!=="object")return new m("Invalid "+J+" `"+R+"` of type `"+Z+"` "+("supplied to `"+G+"`, expected `object`."));for(var z in D){var X=D[z];if(typeof X!="function")return O(G,J,R,z,B(X));var H=X(K,z,G,J,R+"."+z,n);if(H)return H}return null}return v(A)}function M(D){function A(U,Y,G,J,R){var K=U[Y],Z=F(K);if(Z!=="object")return new m("Invalid "+J+" `"+R+"` of type `"+Z+"` "+("supplied to `"+G+"`, expected `object`."));var z=t({},U[Y],D);for(var X in z){var H=D[X];if(r(D,X)&&typeof H!="function")return O(G,J,R,X,B(H));if(!H)return new m("Invalid "+J+" `"+R+"` key `"+X+"` supplied to `"+G+"`.\nBad object: "+JSON.stringify(U[Y],null," ")+`
313
+ Valid keys: `+JSON.stringify(Object.keys(D),null," "));var I=H(K,X,G,J,R+"."+X,n);if(I)return I}return null}return v(A)}function j(D){switch(typeof D){case"number":case"string":case"undefined":return!0;case"boolean":return!D;case"object":if(Array.isArray(D))return D.every(j);if(D===null||o(D))return!0;var A=d(D);if(A){var U=A.call(D),Y;if(A!==D.entries){for(;!(Y=U.next()).done;)if(!j(Y.value))return!1}else for(;!(Y=U.next()).done;){var G=Y.value;if(G&&!j(G[1]))return!1}}else return!1;return!0;default:return!1}}function P(D,A){return D==="symbol"?!0:A?A["@@toStringTag"]==="Symbol"||typeof Symbol=="function"&&A instanceof Symbol:!1}function F(D){var A=typeof D;return Array.isArray(D)?"array":D instanceof RegExp?"object":P(A,D)?"symbol":A}function B(D){if(typeof D>"u"||D===null)return""+D;var A=F(D);if(A==="object"){if(D instanceof Date)return"date";if(D instanceof RegExp)return"regexp"}return A}function W(D){var A=B(D);switch(A){case"array":case"object":return"an "+A;case"boolean":case"date":case"regexp":return"a "+A;default:return A}}function q(D){return!D.constructor||!D.constructor.name?f:D.constructor.name}return g.checkPropTypes=i,g.resetWarningCache=i.resetWarningCache,g.PropTypes=g,g},Gh}var Xh,s_;function dP(){if(s_)return Xh;s_=1;var e=Vh();function t(){}function n(){}return n.resetWarningCache=t,Xh=function(){function r(s,o,l,u,c,d){if(d!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}r.isRequired=r;function i(){return r}var a={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:i,element:r,elementType:r,instanceOf:i,node:r,objectOf:i,oneOf:i,oneOfType:i,shape:i,exact:i,checkPropTypes:n,resetWarningCache:t};return a.PropTypes=a,a},Xh}if(process.env.NODE_ENV!=="production"){var fP=Q1(),hP=!0;Uh.exports=cP()(fP.isElement,hP)}else Uh.exports=dP()();var yi=Uh.exports;const V=qs(yi);var o_={exports:{}};/*!
314
+ Copyright (c) 2018 Jed Watson.
315
+ Licensed under the MIT License (MIT), see
316
+ http://jedwatson.github.io/classnames
317
+ */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var a="",s=0;s<arguments.length;s++){var o=arguments[s];o&&(a=i(a,r(o)))}return a}function r(a){if(typeof a=="string"||typeof a=="number")return a;if(typeof a!="object")return"";if(Array.isArray(a))return n.apply(null,a);if(a.toString!==Object.prototype.toString&&!a.toString.toString().includes("[native code]"))return a.toString();var s="";for(var o in a)t.call(a,o)&&a[o]&&(s=i(s,o));return s}function i(a,s){return s?a?a+" "+s:a+s:a}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})(o_);var Zr=o_.exports;const $e=qs(Zr);var pP=["top","left","transform","className","children","innerRef"];function Jh(){return Jh=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Jh.apply(this,arguments)}function gP(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function ct(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.transform,s=e.className,o=e.children,l=e.innerRef,u=gP(e,pP);return _.createElement("g",Jh({ref:l,className:$e("visx-group",s),transform:a||"translate("+i+", "+n+")"},u),o)}ct.propTypes={top:V.number,left:V.number,transform:V.string,className:V.string,children:V.node,innerRef:V.oneOfType([V.string,V.func,V.object])};const mP=Object.freeze(Object.defineProperty({__proto__:null,Group:ct},Symbol.toStringTag,{value:"Module"}));function xi(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function vP(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Gu(e){let t,n,r;e.length!==2?(t=xi,n=(o,l)=>xi(e(o),l),r=(o,l)=>e(o)-l):(t=e===xi||e===vP?e:yP,n=e,r=e);function i(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;n(o[d],l)<0?u=d+1:c=d}while(u<c)}return u}function a(o,l,u=0,c=o.length){if(u<c){if(t(l,l)!==0)return c;do{const d=u+c>>>1;n(o[d],l)<=0?u=d+1:c=d}while(u<c)}return u}function s(o,l,u=0,c=o.length){const d=i(o,l,u,c-1);return d>u&&r(o[d-1],l)>-r(o[d],l)?d-1:d}return{left:i,center:s,right:a}}function yP(){return 0}function l_(e){return e===null?NaN:+e}function*xP(e,t){for(let n of e)n!=null&&(n=+n)>=n&&(yield n)}const u_=Gu(xi),$o=u_.right,bP=u_.left;Gu(l_).center;function c_(e,t){let n,r;for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));return[n,r]}class d_ extends Map{constructor(t,n=kP){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:n}}),t!=null)for(const[r,i]of t)this.set(r,i)}get(t){return super.get(f_(this,t))}has(t){return super.has(f_(this,t))}set(t,n){return super.set(_P(this,t),n)}delete(t){return super.delete(wP(this,t))}}function f_({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):n}function _P({_intern:e,_key:t},n){const r=t(n);return e.has(r)?e.get(r):(e.set(r,n),n)}function wP({_intern:e,_key:t},n){const r=t(n);return e.has(r)&&(n=e.get(r),e.delete(r)),n}function kP(e){return e!==null&&typeof e=="object"?e.valueOf():e}function SP(e=xi){if(e===xi)return h_;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,n)=>{const r=e(t,n);return r||r===0?r:(e(n,n)===0)-(e(t,t)===0)}}function h_(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var Zh=Math.sqrt(50),Qh=Math.sqrt(10),ep=Math.sqrt(2);function tp(e,t,n){var r,i=-1,a,s,o;if(t=+t,e=+e,n=+n,e===t&&n>0)return[e];if((r=t<e)&&(a=e,e=t,t=a),(o=p_(e,t,n))===0||!isFinite(o))return[];if(o>0){let l=Math.round(e/o),u=Math.round(t/o);for(l*o<e&&++l,u*o>t&&--u,s=new Array(a=u-l+1);++i<a;)s[i]=(l+i)*o}else{o=-o;let l=Math.round(e*o),u=Math.round(t*o);for(l/o<e&&++l,u/o>t&&--u,s=new Array(a=u-l+1);++i<a;)s[i]=(l+i)/o}return r&&s.reverse(),s}function p_(e,t,n){var r=(t-e)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=Zh?10:a>=Qh?5:a>=ep?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=Zh?10:a>=Qh?5:a>=ep?2:1)}function np(e,t,n){var r=Math.abs(t-e)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=Zh?i*=10:a>=Qh?i*=5:a>=ep&&(i*=2),t<e?-i:i}function g_(e,t){let n;for(const r of e)r!=null&&(n<r||n===void 0&&r>=r)&&(n=r);return n}function m_(e,t){let n;for(const r of e)r!=null&&(n>r||n===void 0&&r>=r)&&(n=r);return n}function v_(e,t,n=0,r=1/0,i){if(t=Math.floor(t),n=Math.floor(Math.max(0,n)),r=Math.floor(Math.min(e.length-1,r)),!(n<=t&&t<=r))return e;for(i=i===void 0?h_:SP(i);r>n;){if(r-n>600){const l=r-n+1,u=t-n+1,c=Math.log(l),d=.5*Math.exp(2*c/3),f=.5*Math.sqrt(c*d*(l-d)/l)*(u-l/2<0?-1:1),g=Math.max(n,Math.floor(t-u*d/l+f)),p=Math.min(r,Math.floor(t+(l-u)*d/l+f));v_(e,t,g,p,i)}const a=e[t];let s=n,o=r;for(Po(e,n,t),i(e[r],a)>0&&Po(e,n,r);s<o;){for(Po(e,s,o),++s,--o;i(e[s],a)<0;)++s;for(;i(e[o],a)>0;)--o}i(e[n],a)===0?Po(e,n,o):(++o,Po(e,o,r)),o<=t&&(n=o+1),t<=o&&(r=o-1)}return e}function Po(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function NP(e,t,n){if(e=Float64Array.from(xP(e)),!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return m_(e);if(t>=1)return g_(e);var r,i=(r-1)*t,a=Math.floor(i),s=g_(v_(e,a).subarray(0,a+1)),o=m_(e.subarray(a+1));return s+(o-s)*(i-a)}}function EP(e,t,n=l_){if(!(!(r=e.length)||isNaN(t=+t))){if(t<=0||r<2)return+n(e[0],0,e);if(t>=1)return+n(e[r-1],r-1,e);var r,i=(r-1)*t,a=Math.floor(i),s=+n(e[a],a,e),o=+n(e[a+1],a+1,e);return s+(o-s)*(i-a)}}function y_(e,t,n){e=+e,t=+t,n=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+n;for(var r=-1,i=Math.max(0,Math.ceil((t-e)/n))|0,a=new Array(i);++r<i;)a[r]=e+r*n;return a}function Ln(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Qr(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}const rp=Symbol("implicit");function Xu(){var e=new d_,t=[],n=[],r=rp;function i(a){let s=e.get(a);if(s===void 0){if(r!==rp)return r;e.set(a,s=t.push(a)-1)}return n[s%n.length]}return i.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new d_;for(const s of a)e.has(s)||e.set(s,t.push(s)-1);return i},i.range=function(a){return arguments.length?(n=Array.from(a),i):n.slice()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return Xu(t,n).unknown(r)},Ln.apply(i,arguments),i}function Ju(){var e=Xu().unknown(void 0),t=e.domain,n=e.range,r=0,i=1,a,s,o=!1,l=0,u=0,c=.5;delete e.unknown;function d(){var f=t().length,g=i<r,p=g?i:r,m=g?r:i;a=(m-p)/Math.max(1,f-l+u*2),o&&(a=Math.floor(a)),p+=(m-p-a*(f-l))*c,s=a*(1-l),o&&(p=Math.round(p),s=Math.round(s));var v=y_(f).map(function(x){return p+a*x});return n(g?v.reverse():v)}return e.domain=function(f){return arguments.length?(t(f),d()):t()},e.range=function(f){return arguments.length?([r,i]=f,r=+r,i=+i,d()):[r,i]},e.rangeRound=function(f){return[r,i]=f,r=+r,i=+i,o=!0,d()},e.bandwidth=function(){return s},e.step=function(){return a},e.round=function(f){return arguments.length?(o=!!f,d()):o},e.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),d()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},e.paddingOuter=function(f){return arguments.length?(u=+f,d()):u},e.align=function(f){return arguments.length?(c=Math.max(0,Math.min(1,f)),d()):c},e.copy=function(){return Ju(t(),[r,i]).round(o).paddingInner(l).paddingOuter(u).align(c)},Ln.apply(d(),arguments)}function x_(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return x_(t())},e}function b_(){return x_(Ju.apply(null,arguments).paddingInner(1))}function gs(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ao(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function bi(){}var ua=.7,ms=1/ua,vs="\\s*([+-]?\\d+)\\s*",Lo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Er="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",TP=/^#([0-9a-f]{3,8})$/,CP=new RegExp(`^rgb\\(${vs},${vs},${vs}\\)$`),MP=new RegExp(`^rgb\\(${Er},${Er},${Er}\\)$`),jP=new RegExp(`^rgba\\(${vs},${vs},${vs},${Lo}\\)$`),OP=new RegExp(`^rgba\\(${Er},${Er},${Er},${Lo}\\)$`),$P=new RegExp(`^hsl\\(${Lo},${Er},${Er}\\)$`),PP=new RegExp(`^hsla\\(${Lo},${Er},${Er},${Lo}\\)$`),__={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};gs(bi,Do,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:w_,formatHex:w_,formatHex8:AP,formatHsl:LP,formatRgb:k_,toString:k_});function w_(){return this.rgb().formatHex()}function AP(){return this.rgb().formatHex8()}function LP(){return C_(this).formatHsl()}function k_(){return this.rgb().formatRgb()}function Do(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=TP.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?S_(t):n===3?new At(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Zu(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Zu(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=CP.exec(e))?new At(t[1],t[2],t[3],1):(t=MP.exec(e))?new At(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=jP.exec(e))?Zu(t[1],t[2],t[3],t[4]):(t=OP.exec(e))?Zu(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=$P.exec(e))?T_(t[1],t[2]/100,t[3]/100,1):(t=PP.exec(e))?T_(t[1],t[2]/100,t[3]/100,t[4]):__.hasOwnProperty(e)?S_(__[e]):e==="transparent"?new At(NaN,NaN,NaN,0):null}function S_(e){return new At(e>>16&255,e>>8&255,e&255,1)}function Zu(e,t,n,r){return r<=0&&(e=t=n=NaN),new At(e,t,n,r)}function ip(e){return e instanceof bi||(e=Do(e)),e?(e=e.rgb(),new At(e.r,e.g,e.b,e.opacity)):new At}function Qu(e,t,n,r){return arguments.length===1?ip(e):new At(e,t,n,r??1)}function At(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}gs(At,Qu,Ao(bi,{brighter(e){return e=e==null?ms:Math.pow(ms,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?ua:Math.pow(ua,e),new At(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new At(ca(this.r),ca(this.g),ca(this.b),ec(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:N_,formatHex:N_,formatHex8:DP,formatRgb:E_,toString:E_}));function N_(){return`#${da(this.r)}${da(this.g)}${da(this.b)}`}function DP(){return`#${da(this.r)}${da(this.g)}${da(this.b)}${da((isNaN(this.opacity)?1:this.opacity)*255)}`}function E_(){const e=ec(this.opacity);return`${e===1?"rgb(":"rgba("}${ca(this.r)}, ${ca(this.g)}, ${ca(this.b)}${e===1?")":`, ${e})`}`}function ec(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function ca(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function da(e){return e=ca(e),(e<16?"0":"")+e.toString(16)}function T_(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new rr(e,t,n,r)}function C_(e){if(e instanceof rr)return new rr(e.h,e.s,e.l,e.opacity);if(e instanceof bi||(e=Do(e)),!e)return new rr;if(e instanceof rr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),s=NaN,o=a-i,l=(a+i)/2;return o?(t===a?s=(n-r)/o+(n<r)*6:n===a?s=(r-t)/o+2:s=(t-n)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new rr(s,o,l,e.opacity)}function ap(e,t,n,r){return arguments.length===1?C_(e):new rr(e,t,n,r??1)}function rr(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}gs(rr,ap,Ao(bi,{brighter(e){return e=e==null?ms:Math.pow(ms,e),new rr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ua:Math.pow(ua,e),new rr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new At(sp(e>=240?e-240:e+120,i,r),sp(e,i,r),sp(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new rr(M_(this.h),tc(this.s),tc(this.l),ec(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=ec(this.opacity);return`${e===1?"hsl(":"hsla("}${M_(this.h)}, ${tc(this.s)*100}%, ${tc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function M_(e){return e=(e||0)%360,e<0?e+360:e}function tc(e){return Math.max(0,Math.min(1,e||0))}function sp(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const j_=Math.PI/180,O_=180/Math.PI,nc=18,$_=.96422,P_=1,A_=.82521,L_=4/29,ys=6/29,D_=3*ys*ys,IP=ys*ys*ys;function I_(e){if(e instanceof Tr)return new Tr(e.l,e.a,e.b,e.opacity);if(e instanceof ei)return F_(e);e instanceof At||(e=ip(e));var t=dp(e.r),n=dp(e.g),r=dp(e.b),i=lp((.2225045*t+.7168786*n+.0606169*r)/P_),a,s;return t===n&&n===r?a=s=i:(a=lp((.4360747*t+.3850649*n+.1430804*r)/$_),s=lp((.0139322*t+.0971045*n+.7141733*r)/A_)),new Tr(116*i-16,500*(a-i),200*(i-s),e.opacity)}function op(e,t,n,r){return arguments.length===1?I_(e):new Tr(e,t,n,r??1)}function Tr(e,t,n,r){this.l=+e,this.a=+t,this.b=+n,this.opacity=+r}gs(Tr,op,Ao(bi,{brighter(e){return new Tr(this.l+nc*(e??1),this.a,this.b,this.opacity)},darker(e){return new Tr(this.l-nc*(e??1),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,n=isNaN(this.b)?e:e-this.b/200;return t=$_*up(t),e=P_*up(e),n=A_*up(n),new At(cp(3.1338561*t-1.6168667*e-.4906146*n),cp(-.9787684*t+1.9161415*e+.033454*n),cp(.0719453*t-.2289914*e+1.4052427*n),this.opacity)}}));function lp(e){return e>IP?Math.pow(e,1/3):e/D_+L_}function up(e){return e>ys?e*e*e:D_*(e-L_)}function cp(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function dp(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function FP(e){if(e instanceof ei)return new ei(e.h,e.c,e.l,e.opacity);if(e instanceof Tr||(e=I_(e)),e.a===0&&e.b===0)return new ei(NaN,0<e.l&&e.l<100?0:NaN,e.l,e.opacity);var t=Math.atan2(e.b,e.a)*O_;return new ei(t<0?t+360:t,Math.sqrt(e.a*e.a+e.b*e.b),e.l,e.opacity)}function fp(e,t,n,r){return arguments.length===1?FP(e):new ei(e,t,n,r??1)}function ei(e,t,n,r){this.h=+e,this.c=+t,this.l=+n,this.opacity=+r}function F_(e){if(isNaN(e.h))return new Tr(e.l,0,0,e.opacity);var t=e.h*j_;return new Tr(e.l,Math.cos(t)*e.c,Math.sin(t)*e.c,e.opacity)}gs(ei,fp,Ao(bi,{brighter(e){return new ei(this.h,this.c,this.l+nc*(e??1),this.opacity)},darker(e){return new ei(this.h,this.c,this.l-nc*(e??1),this.opacity)},rgb(){return F_(this).rgb()}}));var z_=-.14861,hp=1.78277,pp=-.29227,rc=-.90649,Io=1.97294,R_=Io*rc,B_=Io*hp,W_=hp*pp-rc*z_;function zP(e){if(e instanceof fa)return new fa(e.h,e.s,e.l,e.opacity);e instanceof At||(e=ip(e));var t=e.r/255,n=e.g/255,r=e.b/255,i=(W_*r+R_*t-B_*n)/(W_+R_-B_),a=r-i,s=(Io*(n-i)-pp*a)/rc,o=Math.sqrt(s*s+a*a)/(Io*i*(1-i)),l=o?Math.atan2(s,a)*O_-120:NaN;return new fa(l<0?l+360:l,o,i,e.opacity)}function gp(e,t,n,r){return arguments.length===1?zP(e):new fa(e,t,n,r??1)}function fa(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}gs(fa,gp,Ao(bi,{brighter(e){return e=e==null?ms:Math.pow(ms,e),new fa(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?ua:Math.pow(ua,e),new fa(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*j_,t=+this.l,n=isNaN(this.s)?0:this.s*t*(1-t),r=Math.cos(e),i=Math.sin(e);return new At(255*(t+n*(z_*r+hp*i)),255*(t+n*(pp*r+rc*i)),255*(t+n*(Io*r)),this.opacity)}}));function U_(e,t,n,r,i){var a=e*e,s=a*e;return((1-3*e+3*a-s)*t+(4-6*a+3*s)*n+(1+3*e+3*a-3*s)*r+s*i)/6}function H_(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),i=e[r],a=e[r+1],s=r>0?e[r-1]:2*i-a,o=r<t-1?e[r+2]:2*a-i;return U_((n-r/t)*t,s,i,a,o)}}function q_(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),i=e[(r+t-1)%t],a=e[r%t],s=e[(r+1)%t],o=e[(r+2)%t];return U_((n-r/t)*t,i,a,s,o)}}const ic=e=>()=>e;function V_(e,t){return function(n){return e+n*t}}function RP(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function ac(e,t){var n=t-e;return n?V_(e,n>180||n<-180?n-360*Math.round(n/360):n):ic(isNaN(e)?t:e)}function BP(e){return(e=+e)==1?Lt:function(t,n){return n-t?RP(t,n,e):ic(isNaN(t)?n:t)}}function Lt(e,t){var n=t-e;return n?V_(e,n):ic(isNaN(e)?t:e)}const sc=function e(t){var n=BP(t);function r(i,a){var s=n((i=Qu(i)).r,(a=Qu(a)).r),o=n(i.g,a.g),l=n(i.b,a.b),u=Lt(i.opacity,a.opacity);return function(c){return i.r=s(c),i.g=o(c),i.b=l(c),i.opacity=u(c),i+""}}return r.gamma=e,r}(1);function K_(e){return function(t){var n=t.length,r=new Array(n),i=new Array(n),a=new Array(n),s,o;for(s=0;s<n;++s)o=Qu(t[s]),r[s]=o.r||0,i[s]=o.g||0,a[s]=o.b||0;return r=e(r),i=e(i),a=e(a),o.opacity=1,function(l){return o.r=r(l),o.g=i(l),o.b=a(l),o+""}}}var WP=K_(H_),UP=K_(q_);function mp(e,t){t||(t=[]);var n=e?Math.min(t.length,e.length):0,r=t.slice(),i;return function(a){for(i=0;i<n;++i)r[i]=e[i]*(1-a)+t[i]*a;return r}}function Y_(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function HP(e,t){return(Y_(t)?mp:G_)(e,t)}function G_(e,t){var n=t?t.length:0,r=e?Math.min(n,e.length):0,i=new Array(r),a=new Array(n),s;for(s=0;s<r;++s)i[s]=ha(e[s],t[s]);for(;s<n;++s)a[s]=t[s];return function(o){for(s=0;s<r;++s)a[s]=i[s](o);return a}}function X_(e,t){var n=new Date;return e=+e,t=+t,function(r){return n.setTime(e*(1-r)+t*r),n}}function ir(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function J_(e,t){var n={},r={},i;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(i in t)i in e?n[i]=ha(e[i],t[i]):r[i]=t[i];return function(a){for(i in n)r[i]=n[i](a);return r}}var vp=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,yp=new RegExp(vp.source,"g");function qP(e){return function(){return e}}function VP(e){return function(t){return e(t)+""}}function Z_(e,t){var n=vp.lastIndex=yp.lastIndex=0,r,i,a,s=-1,o=[],l=[];for(e=e+"",t=t+"";(r=vp.exec(e))&&(i=yp.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),o[s]?o[s]+=a:o[++s]=a),(r=r[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:ir(r,i)})),n=yp.lastIndex;return n<t.length&&(a=t.slice(n),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?VP(l[0].x):qP(t):(t=l.length,function(u){for(var c=0,d;c<t;++c)o[(d=l[c]).i]=d.x(u);return o.join("")})}function ha(e,t){var n=typeof t,r;return t==null||n==="boolean"?ic(t):(n==="number"?ir:n==="string"?(r=Do(t))?(t=r,sc):Z_:t instanceof Do?sc:t instanceof Date?X_:Y_(t)?mp:Array.isArray(t)?G_:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?J_:ir)(e,t)}function KP(e){var t=e.length;return function(n){return e[Math.max(0,Math.min(t-1,Math.floor(n*t)))]}}function YP(e,t){var n=ac(+e,+t);return function(r){var i=n(r);return i-360*Math.floor(i/360)}}function Fo(e,t){return e=+e,t=+t,function(n){return Math.round(e*(1-n)+t*n)}}var Q_=180/Math.PI,xp={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ew(e,t,n,r,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(o=Math.sqrt(n*n+r*r))&&(n/=o,r/=o,l/=o),e*r<t*n&&(e=-e,t=-t,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Q_,skewX:Math.atan(l)*Q_,scaleX:s,scaleY:o}}var oc;function GP(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?xp:ew(t.a,t.b,t.c,t.d,t.e,t.f)}function XP(e){return e==null||(oc||(oc=document.createElementNS("http://www.w3.org/2000/svg","g")),oc.setAttribute("transform",e),!(e=oc.transform.baseVal.consolidate()))?xp:(e=e.matrix,ew(e.a,e.b,e.c,e.d,e.e,e.f))}function tw(e,t,n,r){function i(u){return u.length?u.pop()+" ":""}function a(u,c,d,f,g,p){if(u!==d||c!==f){var m=g.push("translate(",null,t,null,n);p.push({i:m-4,x:ir(u,d)},{i:m-2,x:ir(c,f)})}else(d||f)&&g.push("translate("+d+t+f+n)}function s(u,c,d,f){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,r)-2,x:ir(u,c)})):c&&d.push(i(d)+"rotate("+c+r)}function o(u,c,d,f){u!==c?f.push({i:d.push(i(d)+"skewX(",null,r)-2,x:ir(u,c)}):c&&d.push(i(d)+"skewX("+c+r)}function l(u,c,d,f,g,p){if(u!==d||c!==f){var m=g.push(i(g)+"scale(",null,",",null,")");p.push({i:m-4,x:ir(u,d)},{i:m-2,x:ir(c,f)})}else(d!==1||f!==1)&&g.push(i(g)+"scale("+d+","+f+")")}return function(u,c){var d=[],f=[];return u=e(u),c=e(c),a(u.translateX,u.translateY,c.translateX,c.translateY,d,f),s(u.rotate,c.rotate,d,f),o(u.skewX,c.skewX,d,f),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,d,f),u=c=null,function(g){for(var p=-1,m=f.length,v;++p<m;)d[(v=f[p]).i]=v.x(g);return d.join("")}}}var JP=tw(GP,"px, ","px)","deg)"),ZP=tw(XP,", ",")",")"),QP=1e-12;function nw(e){return((e=Math.exp(e))+1/e)/2}function eA(e){return((e=Math.exp(e))-1/e)/2}function tA(e){return((e=Math.exp(2*e))-1)/(e+1)}const nA=function e(t,n,r){function i(a,s){var o=a[0],l=a[1],u=a[2],c=s[0],d=s[1],f=s[2],g=c-o,p=d-l,m=g*g+p*p,v,x;if(m<QP)x=Math.log(f/u)/t,v=function(N){return[o+N*g,l+N*p,u*Math.exp(t*N*x)]};else{var y=Math.sqrt(m),b=(f*f-u*u+r*m)/(2*u*n*y),k=(f*f-u*u-r*m)/(2*f*n*y),w=Math.log(Math.sqrt(b*b+1)-b),S=Math.log(Math.sqrt(k*k+1)-k);x=(S-w)/t,v=function(N){var E=N*x,T=nw(w),C=u/(n*y)*(T*tA(t*E+w)-eA(w));return[o+C*g,l+C*p,u*T/nw(t*E+w)]}}return v.duration=x*1e3*t/Math.SQRT2,v}return i.rho=function(a){var s=Math.max(.001,+a),o=s*s,l=o*o;return e(s,o,l)},i}(Math.SQRT2,2,4);function rw(e){return function(t,n){var r=e((t=ap(t)).h,(n=ap(n)).h),i=Lt(t.s,n.s),a=Lt(t.l,n.l),s=Lt(t.opacity,n.opacity);return function(o){return t.h=r(o),t.s=i(o),t.l=a(o),t.opacity=s(o),t+""}}}const iw=rw(ac);var aw=rw(Lt);function sw(e,t){var n=Lt((e=op(e)).l,(t=op(t)).l),r=Lt(e.a,t.a),i=Lt(e.b,t.b),a=Lt(e.opacity,t.opacity);return function(s){return e.l=n(s),e.a=r(s),e.b=i(s),e.opacity=a(s),e+""}}function ow(e){return function(t,n){var r=e((t=fp(t)).h,(n=fp(n)).h),i=Lt(t.c,n.c),a=Lt(t.l,n.l),s=Lt(t.opacity,n.opacity);return function(o){return t.h=r(o),t.c=i(o),t.l=a(o),t.opacity=s(o),t+""}}}const lw=ow(ac);var uw=ow(Lt);function cw(e){return function t(n){n=+n;function r(i,a){var s=e((i=gp(i)).h,(a=gp(a)).h),o=Lt(i.s,a.s),l=Lt(i.l,a.l),u=Lt(i.opacity,a.opacity);return function(c){return i.h=s(c),i.s=o(c),i.l=l(Math.pow(c,n)),i.opacity=u(c),i+""}}return r.gamma=t,r}(1)}const dw=cw(ac);var fw=cw(Lt);function hw(e,t){t===void 0&&(t=e,e=ha);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return function(s){var o=Math.max(0,Math.min(r-1,Math.floor(s*=r)));return a[o](s-o)}}function rA(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e(r/(t-1));return n}function iA(e){return function(){return e}}function lc(e){return+e}var pw=[0,1];function Qt(e){return e}function bp(e,t){return(t-=e=+e)?function(n){return(n-e)/t}:iA(isNaN(t)?NaN:.5)}function aA(e,t){var n;return e>t&&(n=e,e=t,t=n),function(r){return Math.max(e,Math.min(t,r))}}function sA(e,t,n){var r=e[0],i=e[1],a=t[0],s=t[1];return i<r?(r=bp(i,r),a=n(s,a)):(r=bp(r,i),a=n(a,s)),function(o){return a(r(o))}}function oA(e,t,n){var r=Math.min(e.length,t.length)-1,i=new Array(r),a=new Array(r),s=-1;for(e[r]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<r;)i[s]=bp(e[s],e[s+1]),a[s]=n(t[s],t[s+1]);return function(o){var l=$o(e,o,1,r)-1;return a[l](i[l](o))}}function zo(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function uc(){var e=pw,t=pw,n=ha,r,i,a,s=Qt,o,l,u;function c(){var f=Math.min(e.length,t.length);return s!==Qt&&(s=aA(e[0],e[f-1])),o=f>2?oA:sA,l=u=null,d}function d(f){return f==null||isNaN(f=+f)?a:(l||(l=o(e.map(r),t,n)))(r(s(f)))}return d.invert=function(f){return s(i((u||(u=o(t,e.map(r),ir)))(f)))},d.domain=function(f){return arguments.length?(e=Array.from(f,lc),c()):e.slice()},d.range=function(f){return arguments.length?(t=Array.from(f),c()):t.slice()},d.rangeRound=function(f){return t=Array.from(f),n=Fo,c()},d.clamp=function(f){return arguments.length?(s=f?!0:Qt,c()):s!==Qt},d.interpolate=function(f){return arguments.length?(n=f,c()):n},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,g){return r=f,i=g,c()}}function _p(){return uc()(Qt,Qt)}function lA(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function cc(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,r=e.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+e.slice(n+1)]}function xs(e){return e=cc(Math.abs(e)),e?e[1]:NaN}function uA(e,t){return function(n,r){for(var i=n.length,a=[],s=0,o=e[0],l=0;i>0&&o>0&&(l+o+1>r&&(o=Math.max(1,r-l)),a.push(n.substring(i-=o,i+o)),!((l+=o+1)>r));)o=e[s=(s+1)%e.length];return a.reverse().join(t)}}function cA(e){return function(t){return t.replace(/[0-9]/g,function(n){return e[+n]})}}var dA=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ro(e){if(!(t=dA.exec(e)))throw new Error("invalid format: "+e);var t;return new wp({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}Ro.prototype=wp.prototype;function wp(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}wp.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function fA(e){e:for(var t=e.length,n=1,r=-1,i;n<t;++n)switch(e[n]){case".":r=i=n;break;case"0":r===0&&(r=n),i=n;break;default:if(!+e[n])break e;r>0&&(r=0);break}return r>0?e.slice(0,r)+e.slice(i+1):e}var gw;function hA(e,t){var n=cc(e,t);if(!n)return e+"";var r=n[0],i=n[1],a=i-(gw=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=r.length;return a===s?r:a>s?r+new Array(a-s+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+cc(e,Math.max(0,t+a-1))[0]}function mw(e,t){var n=cc(e,t);if(!n)return e+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")}const vw={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:lA,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>mw(e*100,t),r:mw,s:hA,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function yw(e){return e}var xw=Array.prototype.map,bw=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function pA(e){var t=e.grouping===void 0||e.thousands===void 0?yw:uA(xw.call(e.grouping,Number),e.thousands+""),n=e.currency===void 0?"":e.currency[0]+"",r=e.currency===void 0?"":e.currency[1]+"",i=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?yw:cA(xw.call(e.numerals,String)),s=e.percent===void 0?"%":e.percent+"",o=e.minus===void 0?"−":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(d){d=Ro(d);var f=d.fill,g=d.align,p=d.sign,m=d.symbol,v=d.zero,x=d.width,y=d.comma,b=d.precision,k=d.trim,w=d.type;w==="n"?(y=!0,w="g"):vw[w]||(b===void 0&&(b=12),k=!0,w="g"),(v||f==="0"&&g==="=")&&(v=!0,f="0",g="=");var S=m==="$"?n:m==="#"&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",N=m==="$"?r:/[%p]/.test(w)?s:"",E=vw[w],T=/[defgprs%]/.test(w);b=b===void 0?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function C(O){var $=S,M=N,j,P,F;if(w==="c")M=E(O)+M,O="";else{O=+O;var B=O<0||1/O<0;if(O=isNaN(O)?l:E(Math.abs(O),b),k&&(O=fA(O)),B&&+O==0&&p!=="+"&&(B=!1),$=(B?p==="("?p:o:p==="-"||p==="("?"":p)+$,M=(w==="s"?bw[8+gw/3]:"")+M+(B&&p==="("?")":""),T){for(j=-1,P=O.length;++j<P;)if(F=O.charCodeAt(j),48>F||F>57){M=(F===46?i+O.slice(j+1):O.slice(j))+M,O=O.slice(0,j);break}}}y&&!v&&(O=t(O,1/0));var W=$.length+O.length+M.length,q=W<x?new Array(x-W+1).join(f):"";switch(y&&v&&(O=t(q+O,q.length?x-M.length:1/0),q=""),g){case"<":O=$+O+M+q;break;case"=":O=$+q+O+M;break;case"^":O=q.slice(0,W=q.length>>1)+$+O+M+q.slice(W);break;default:O=q+$+O+M;break}return a(O)}return C.toString=function(){return d+""},C}function c(d,f){var g=u((d=Ro(d),d.type="f",d)),p=Math.max(-8,Math.min(8,Math.floor(xs(f)/3)))*3,m=Math.pow(10,-p),v=bw[8+p/3];return function(x){return g(m*x)+v}}return{format:u,formatPrefix:c}}var dc,kp,_w;gA({thousands:",",grouping:[3],currency:["$",""]});function gA(e){return dc=pA(e),kp=dc.format,_w=dc.formatPrefix,dc}function mA(e){return Math.max(0,-xs(Math.abs(e)))}function vA(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(xs(t)/3)))*3-xs(Math.abs(e)))}function yA(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,xs(t)-xs(e))+1}function ww(e,t,n,r){var i=np(e,t,n),a;switch(r=Ro(r??",f"),r.type){case"s":{var s=Math.max(Math.abs(e),Math.abs(t));return r.precision==null&&!isNaN(a=vA(i,s))&&(r.precision=a),_w(r,s)}case"":case"e":case"g":case"p":case"r":{r.precision==null&&!isNaN(a=yA(i,Math.max(Math.abs(e),Math.abs(t))))&&(r.precision=a-(r.type==="e"));break}case"f":case"%":{r.precision==null&&!isNaN(a=mA(i))&&(r.precision=a-(r.type==="%")*2);break}}return kp(r)}function _i(e){var t=e.domain;return e.ticks=function(n){var r=t();return tp(r[0],r[r.length-1],n??10)},e.tickFormat=function(n,r){var i=t();return ww(i[0],i[i.length-1],n??10,r)},e.nice=function(n){n==null&&(n=10);var r=t(),i=0,a=r.length-1,s=r[i],o=r[a],l,u,c=10;for(o<s&&(u=s,s=o,o=u,u=i,i=a,a=u);c-- >0;){if(u=p_(s,o,n),u===l)return r[i]=s,r[a]=o,t(r);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return e},e}function Sp(){var e=_p();return e.copy=function(){return zo(e,Sp())},Ln.apply(e,arguments),_i(e)}function kw(e){var t;function n(r){return r==null||isNaN(r=+r)?t:r}return n.invert=n,n.domain=n.range=function(r){return arguments.length?(e=Array.from(r,lc),n):e.slice()},n.unknown=function(r){return arguments.length?(t=r,n):t},n.copy=function(){return kw(e).unknown(t)},e=arguments.length?Array.from(e,lc):[0,1],_i(n)}function Sw(e,t){e=e.slice();var n=0,r=e.length-1,i=e[n],a=e[r],s;return a<i&&(s=n,n=r,r=s,s=i,i=a,a=s),e[n]=t.floor(i),e[r]=t.ceil(a),e}function Nw(e){return Math.log(e)}function Ew(e){return Math.exp(e)}function xA(e){return-Math.log(-e)}function bA(e){return-Math.exp(-e)}function _A(e){return isFinite(e)?+("1e"+e):e<0?0:e}function wA(e){return e===10?_A:e===Math.E?Math.exp:t=>Math.pow(e,t)}function kA(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function Tw(e){return(t,n)=>-e(-t,n)}function Np(e){const t=e(Nw,Ew),n=t.domain;let r=10,i,a;function s(){return i=kA(r),a=wA(r),n()[0]<0?(i=Tw(i),a=Tw(a),e(xA,bA)):e(Nw,Ew),t}return t.base=function(o){return arguments.length?(r=+o,s()):r},t.domain=function(o){return arguments.length?(n(o),s()):n()},t.ticks=o=>{const l=n();let u=l[0],c=l[l.length-1];const d=c<u;d&&([u,c]=[c,u]);let f=i(u),g=i(c),p,m;const v=o==null?10:+o;let x=[];if(!(r%1)&&g-f<v){if(f=Math.floor(f),g=Math.ceil(g),u>0){for(;f<=g;++f)for(p=1;p<r;++p)if(m=f<0?p/a(-f):p*a(f),!(m<u)){if(m>c)break;x.push(m)}}else for(;f<=g;++f)for(p=r-1;p>=1;--p)if(m=f>0?p/a(-f):p*a(f),!(m<u)){if(m>c)break;x.push(m)}x.length*2<v&&(x=tp(u,c,v))}else x=tp(f,g,Math.min(g-f,v)).map(a);return d?x.reverse():x},t.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=r===10?"s":","),typeof l!="function"&&(!(r%1)&&(l=Ro(l)).precision==null&&(l.trim=!0),l=kp(l)),o===1/0)return l;const u=Math.max(1,r*o/t.ticks().length);return c=>{let d=c/a(Math.round(i(c)));return d*r<r-.5&&(d*=r),d<=u?l(c):""}},t.nice=()=>n(Sw(n(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),t}function Ep(){const e=Np(uc()).domain([1,10]);return e.copy=()=>zo(e,Ep()).base(e.base()),Ln.apply(e,arguments),e}function Cw(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function Mw(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Tp(e){var t=1,n=e(Cw(t),Mw(t));return n.constant=function(r){return arguments.length?e(Cw(t=+r),Mw(t)):t},_i(n)}function Cp(){var e=Tp(uc());return e.copy=function(){return zo(e,Cp()).constant(e.constant())},Ln.apply(e,arguments)}function jw(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function SA(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function NA(e){return e<0?-e*e:e*e}function Mp(e){var t=e(Qt,Qt),n=1;function r(){return n===1?e(Qt,Qt):n===.5?e(SA,NA):e(jw(n),jw(1/n))}return t.exponent=function(i){return arguments.length?(n=+i,r()):n},_i(t)}function fc(){var e=Mp(uc());return e.copy=function(){return zo(e,fc()).exponent(e.exponent())},Ln.apply(e,arguments),e}function Ow(){return fc.apply(null,arguments).exponent(.5)}function $w(e){return Math.sign(e)*e*e}function EA(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function jp(){var e=_p(),t=[0,1],n=!1,r;function i(a){var s=EA(e(a));return isNaN(s)?r:n?Math.round(s):s}return i.invert=function(a){return e.invert($w(a))},i.domain=function(a){return arguments.length?(e.domain(a),i):e.domain()},i.range=function(a){return arguments.length?(e.range((t=Array.from(a,lc)).map($w)),i):t.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(n=!!a,i):n},i.clamp=function(a){return arguments.length?(e.clamp(a),i):e.clamp()},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return jp(e.domain(),t).round(n).clamp(e.clamp()).unknown(r)},Ln.apply(i,arguments),_i(i)}function Op(){var e=[],t=[],n=[],r;function i(){var s=0,o=Math.max(1,t.length);for(n=new Array(o-1);++s<o;)n[s-1]=EP(e,s/o);return a}function a(s){return s==null||isNaN(s=+s)?r:t[$o(n,s)]}return a.invertExtent=function(s){var o=t.indexOf(s);return o<0?[NaN,NaN]:[o>0?n[o-1]:e[0],o<n.length?n[o]:e[e.length-1]]},a.domain=function(s){if(!arguments.length)return e.slice();e=[];for(let o of s)o!=null&&!isNaN(o=+o)&&e.push(o);return e.sort(xi),i()},a.range=function(s){return arguments.length?(t=Array.from(s),i()):t.slice()},a.unknown=function(s){return arguments.length?(r=s,a):r},a.quantiles=function(){return n.slice()},a.copy=function(){return Op().domain(e).range(t).unknown(r)},Ln.apply(a,arguments)}function $p(){var e=0,t=1,n=1,r=[.5],i=[0,1],a;function s(l){return l!=null&&l<=l?i[$o(r,l,0,n)]:a}function o(){var l=-1;for(r=new Array(n);++l<n;)r[l]=((l+1)*t-(l-n)*e)/(n+1);return s}return s.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,o()):[e,t]},s.range=function(l){return arguments.length?(n=(i=Array.from(l)).length-1,o()):i.slice()},s.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,r[0]]:u>=n?[r[n-1],t]:[r[u-1],r[u]]},s.unknown=function(l){return arguments.length&&(a=l),s},s.thresholds=function(){return r.slice()},s.copy=function(){return $p().domain([e,t]).range(i).unknown(a)},Ln.apply(_i(s),arguments)}function Pp(){var e=[.5],t=[0,1],n,r=1;function i(a){return a!=null&&a<=a?t[$o(e,a,0,r)]:n}return i.domain=function(a){return arguments.length?(e=Array.from(a),r=Math.min(e.length,t.length-1),i):e.slice()},i.range=function(a){return arguments.length?(t=Array.from(a),r=Math.min(e.length,t.length-1),i):t.slice()},i.invertExtent=function(a){var s=t.indexOf(a);return[e[s-1],e[s]]},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return Pp().domain(e).range(t).unknown(n)},Ln.apply(i,arguments)}const Ap=new Date,Lp=new Date;function xt(e,t,n,r){function i(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=a=>(e(a=new Date(+a)),a),i.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),i.round=a=>{const s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=(a,s)=>(t(a=new Date(+a),s==null?1:Math.floor(s)),a),i.range=(a,s,o)=>{const l=[];if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;let u;do l.push(u=new Date(+a)),t(a,o),e(a);while(u<a&&a<s);return l},i.filter=a=>xt(s=>{if(s>=s)for(;e(s),!a(s);)s.setTime(s-1)},(s,o)=>{if(s>=s)if(o<0)for(;++o<=0;)for(;t(s,-1),!a(s););else for(;--o>=0;)for(;t(s,1),!a(s););}),n&&(i.count=(a,s)=>(Ap.setTime(+a),Lp.setTime(+s),e(Ap),e(Lp),Math.floor(n(Ap,Lp))),i.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(r?s=>r(s)%a===0:s=>i.count(0,s)%a===0):i)),i}const bs=xt(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);bs.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?xt(t=>{t.setTime(Math.floor(t/e)*e)},(t,n)=>{t.setTime(+t+n*e)},(t,n)=>(n-t)/e):bs);const Pw=bs.range,ti=1e3,Dn=ti*60,ni=Dn*60,ri=ni*24,Dp=ri*7,Aw=ri*30,Ip=ri*365,ar=xt(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*ti)},(e,t)=>(t-e)/ti,e=>e.getUTCSeconds()),Lw=ar.range,Bo=xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ti)},(e,t)=>{e.setTime(+e+t*Dn)},(e,t)=>(t-e)/Dn,e=>e.getMinutes()),TA=Bo.range,Wo=xt(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*Dn)},(e,t)=>(t-e)/Dn,e=>e.getUTCMinutes()),CA=Wo.range,Uo=xt(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*ti-e.getMinutes()*Dn)},(e,t)=>{e.setTime(+e+t*ni)},(e,t)=>(t-e)/ni,e=>e.getHours()),MA=Uo.range,Ho=xt(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*ni)},(e,t)=>(t-e)/ni,e=>e.getUTCHours()),jA=Ho.range,pa=xt(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*Dn)/ri,e=>e.getDate()-1),OA=pa.range,_s=xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ri,e=>e.getUTCDate()-1),$A=_s.range,Fp=xt(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/ri,e=>Math.floor(e/ri)),PA=Fp.range;function ga(e){return xt(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,n)=>{t.setDate(t.getDate()+n*7)},(t,n)=>(n-t-(n.getTimezoneOffset()-t.getTimezoneOffset())*Dn)/Dp)}const ma=ga(0),qo=ga(1),Dw=ga(2),Iw=ga(3),va=ga(4),Fw=ga(5),zw=ga(6),Rw=ma.range,AA=qo.range,LA=Dw.range,DA=Iw.range,IA=va.range,FA=Fw.range,zA=zw.range;function ya(e){return xt(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCDate(t.getUTCDate()+n*7)},(t,n)=>(n-t)/Dp)}const xa=ya(0),Vo=ya(1),Bw=ya(2),Ww=ya(3),ba=ya(4),Uw=ya(5),Hw=ya(6),qw=xa.range,RA=Vo.range,BA=Bw.range,WA=Ww.range,UA=ba.range,HA=Uw.range,qA=Hw.range,Ko=xt(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),VA=Ko.range,Yo=xt(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),KA=Yo.range,sr=xt(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());sr.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:xt(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,n)=>{t.setFullYear(t.getFullYear()+n*e)});const YA=sr.range,or=xt(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());or.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:xt(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,n)=>{t.setUTCFullYear(t.getUTCFullYear()+n*e)});const GA=or.range;function Vw(e,t,n,r,i,a){const s=[[ar,1,ti],[ar,5,5*ti],[ar,15,15*ti],[ar,30,30*ti],[a,1,Dn],[a,5,5*Dn],[a,15,15*Dn],[a,30,30*Dn],[i,1,ni],[i,3,3*ni],[i,6,6*ni],[i,12,12*ni],[r,1,ri],[r,2,2*ri],[n,1,Dp],[t,1,Aw],[t,3,3*Aw],[e,1,Ip]];function o(u,c,d){const f=c<u;f&&([u,c]=[c,u]);const g=d&&typeof d.range=="function"?d:l(u,c,d),p=g?g.range(u,+c+1):[];return f?p.reverse():p}function l(u,c,d){const f=Math.abs(c-u)/d,g=Gu(([,,v])=>v).right(s,f);if(g===s.length)return e.every(np(u/Ip,c/Ip,d));if(g===0)return bs.every(Math.max(np(u,c,d),1));const[p,m]=s[f/s[g-1][2]<s[g][2]/f?g-1:g];return p.every(m)}return[o,l]}const[Kw,Yw]=Vw(or,Yo,xa,Fp,Ho,Wo),[Gw,Xw]=Vw(sr,Ko,ma,pa,Uo,Bo);function zp(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function Rp(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Go(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function XA(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,u=Xo(i),c=Jo(i),d=Xo(a),f=Jo(a),g=Xo(s),p=Jo(s),m=Xo(o),v=Jo(o),x=Xo(l),y=Jo(l),b={a:B,A:W,b:q,B:D,c:null,d:nk,e:nk,f:xL,g:ML,G:OL,H:mL,I:vL,j:yL,L:rk,m:bL,M:_L,p:A,q:U,Q:uk,s:ck,S:wL,u:kL,U:SL,V:NL,w:EL,W:TL,x:null,X:null,y:CL,Y:jL,Z:$L,"%":lk},k={a:Y,A:G,b:J,B:R,c:null,d:ak,e:ak,f:DL,g:VL,G:YL,H:PL,I:AL,j:LL,L:sk,m:IL,M:FL,p:K,q:Z,Q:uk,s:ck,S:zL,u:RL,U:BL,V:WL,w:UL,W:HL,x:null,X:null,y:qL,Y:KL,Z:GL,"%":lk},w={a:C,A:O,b:$,B:M,c:j,d:ek,e:ek,f:fL,g:Qw,G:Zw,H:tk,I:tk,j:lL,L:dL,m:oL,M:uL,p:T,q:sL,Q:pL,s:gL,S:cL,u:tL,U:nL,V:rL,w:eL,W:iL,x:P,X:F,y:Qw,Y:Zw,Z:aL,"%":hL};b.x=S(n,b),b.X=S(r,b),b.c=S(t,b),k.x=S(n,k),k.X=S(r,k),k.c=S(t,k);function S(z,X){return function(H){var I=[],ne=-1,ue=0,ye=z.length,fe,xe,Se;for(H instanceof Date||(H=new Date(+H));++ne<ye;)z.charCodeAt(ne)===37&&(I.push(z.slice(ue,ne)),(xe=Jw[fe=z.charAt(++ne)])!=null?fe=z.charAt(++ne):xe=fe==="e"?" ":"0",(Se=X[fe])&&(fe=Se(H,xe)),I.push(fe),ue=ne+1);return I.push(z.slice(ue,ne)),I.join("")}}function N(z,X){return function(H){var I=Go(1900,void 0,1),ne=E(I,z,H+="",0),ue,ye;if(ne!=H.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(X&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(ue=Rp(Go(I.y,0,1)),ye=ue.getUTCDay(),ue=ye>4||ye===0?Vo.ceil(ue):Vo(ue),ue=_s.offset(ue,(I.V-1)*7),I.y=ue.getUTCFullYear(),I.m=ue.getUTCMonth(),I.d=ue.getUTCDate()+(I.w+6)%7):(ue=zp(Go(I.y,0,1)),ye=ue.getDay(),ue=ye>4||ye===0?qo.ceil(ue):qo(ue),ue=pa.offset(ue,(I.V-1)*7),I.y=ue.getFullYear(),I.m=ue.getMonth(),I.d=ue.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),ye="Z"in I?Rp(Go(I.y,0,1)).getUTCDay():zp(Go(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(ye+5)%7:I.w+I.U*7-(ye+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,Rp(I)):zp(I)}}function E(z,X,H,I){for(var ne=0,ue=X.length,ye=H.length,fe,xe;ne<ue;){if(I>=ye)return-1;if(fe=X.charCodeAt(ne++),fe===37){if(fe=X.charAt(ne++),xe=w[fe in Jw?X.charAt(ne++):fe],!xe||(I=xe(z,H,I))<0)return-1}else if(fe!=H.charCodeAt(I++))return-1}return I}function T(z,X,H){var I=u.exec(X.slice(H));return I?(z.p=c.get(I[0].toLowerCase()),H+I[0].length):-1}function C(z,X,H){var I=g.exec(X.slice(H));return I?(z.w=p.get(I[0].toLowerCase()),H+I[0].length):-1}function O(z,X,H){var I=d.exec(X.slice(H));return I?(z.w=f.get(I[0].toLowerCase()),H+I[0].length):-1}function $(z,X,H){var I=x.exec(X.slice(H));return I?(z.m=y.get(I[0].toLowerCase()),H+I[0].length):-1}function M(z,X,H){var I=m.exec(X.slice(H));return I?(z.m=v.get(I[0].toLowerCase()),H+I[0].length):-1}function j(z,X,H){return E(z,t,X,H)}function P(z,X,H){return E(z,n,X,H)}function F(z,X,H){return E(z,r,X,H)}function B(z){return s[z.getDay()]}function W(z){return a[z.getDay()]}function q(z){return l[z.getMonth()]}function D(z){return o[z.getMonth()]}function A(z){return i[+(z.getHours()>=12)]}function U(z){return 1+~~(z.getMonth()/3)}function Y(z){return s[z.getUTCDay()]}function G(z){return a[z.getUTCDay()]}function J(z){return l[z.getUTCMonth()]}function R(z){return o[z.getUTCMonth()]}function K(z){return i[+(z.getUTCHours()>=12)]}function Z(z){return 1+~~(z.getUTCMonth()/3)}return{format:function(z){var X=S(z+="",b);return X.toString=function(){return z},X},parse:function(z){var X=N(z+="",!1);return X.toString=function(){return z},X},utcFormat:function(z){var X=S(z+="",k);return X.toString=function(){return z},X},utcParse:function(z){var X=N(z+="",!0);return X.toString=function(){return z},X}}}var Jw={"-":"",_:" ",0:"0"},Dt=/^\s*\d+/,JA=/^%/,ZA=/[\\^$*+?|[\]().{}]/g;function ze(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(t)+i:i)}function QA(e){return e.replace(ZA,"\\$&")}function Xo(e){return new RegExp("^(?:"+e.map(QA).join("|")+")","i")}function Jo(e){return new Map(e.map((t,n)=>[t.toLowerCase(),n]))}function eL(e,t,n){var r=Dt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function tL(e,t,n){var r=Dt.exec(t.slice(n,n+1));return r?(e.u=+r[0],n+r[0].length):-1}function nL(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.U=+r[0],n+r[0].length):-1}function rL(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.V=+r[0],n+r[0].length):-1}function iL(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.W=+r[0],n+r[0].length):-1}function Zw(e,t,n){var r=Dt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function Qw(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function aL(e,t,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return r?(e.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function sL(e,t,n){var r=Dt.exec(t.slice(n,n+1));return r?(e.q=r[0]*3-3,n+r[0].length):-1}function oL(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function ek(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function lL(e,t,n){var r=Dt.exec(t.slice(n,n+3));return r?(e.m=0,e.d=+r[0],n+r[0].length):-1}function tk(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function uL(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function cL(e,t,n){var r=Dt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function dL(e,t,n){var r=Dt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function fL(e,t,n){var r=Dt.exec(t.slice(n,n+6));return r?(e.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function hL(e,t,n){var r=JA.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pL(e,t,n){var r=Dt.exec(t.slice(n));return r?(e.Q=+r[0],n+r[0].length):-1}function gL(e,t,n){var r=Dt.exec(t.slice(n));return r?(e.s=+r[0],n+r[0].length):-1}function nk(e,t){return ze(e.getDate(),t,2)}function mL(e,t){return ze(e.getHours(),t,2)}function vL(e,t){return ze(e.getHours()%12||12,t,2)}function yL(e,t){return ze(1+pa.count(sr(e),e),t,3)}function rk(e,t){return ze(e.getMilliseconds(),t,3)}function xL(e,t){return rk(e,t)+"000"}function bL(e,t){return ze(e.getMonth()+1,t,2)}function _L(e,t){return ze(e.getMinutes(),t,2)}function wL(e,t){return ze(e.getSeconds(),t,2)}function kL(e){var t=e.getDay();return t===0?7:t}function SL(e,t){return ze(ma.count(sr(e)-1,e),t,2)}function ik(e){var t=e.getDay();return t>=4||t===0?va(e):va.ceil(e)}function NL(e,t){return e=ik(e),ze(va.count(sr(e),e)+(sr(e).getDay()===4),t,2)}function EL(e){return e.getDay()}function TL(e,t){return ze(qo.count(sr(e)-1,e),t,2)}function CL(e,t){return ze(e.getFullYear()%100,t,2)}function ML(e,t){return e=ik(e),ze(e.getFullYear()%100,t,2)}function jL(e,t){return ze(e.getFullYear()%1e4,t,4)}function OL(e,t){var n=e.getDay();return e=n>=4||n===0?va(e):va.ceil(e),ze(e.getFullYear()%1e4,t,4)}function $L(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+ze(t/60|0,"0",2)+ze(t%60,"0",2)}function ak(e,t){return ze(e.getUTCDate(),t,2)}function PL(e,t){return ze(e.getUTCHours(),t,2)}function AL(e,t){return ze(e.getUTCHours()%12||12,t,2)}function LL(e,t){return ze(1+_s.count(or(e),e),t,3)}function sk(e,t){return ze(e.getUTCMilliseconds(),t,3)}function DL(e,t){return sk(e,t)+"000"}function IL(e,t){return ze(e.getUTCMonth()+1,t,2)}function FL(e,t){return ze(e.getUTCMinutes(),t,2)}function zL(e,t){return ze(e.getUTCSeconds(),t,2)}function RL(e){var t=e.getUTCDay();return t===0?7:t}function BL(e,t){return ze(xa.count(or(e)-1,e),t,2)}function ok(e){var t=e.getUTCDay();return t>=4||t===0?ba(e):ba.ceil(e)}function WL(e,t){return e=ok(e),ze(ba.count(or(e),e)+(or(e).getUTCDay()===4),t,2)}function UL(e){return e.getUTCDay()}function HL(e,t){return ze(Vo.count(or(e)-1,e),t,2)}function qL(e,t){return ze(e.getUTCFullYear()%100,t,2)}function VL(e,t){return e=ok(e),ze(e.getUTCFullYear()%100,t,2)}function KL(e,t){return ze(e.getUTCFullYear()%1e4,t,4)}function YL(e,t){var n=e.getUTCDay();return e=n>=4||n===0?ba(e):ba.ceil(e),ze(e.getUTCFullYear()%1e4,t,4)}function GL(){return"+0000"}function lk(){return"%"}function uk(e){return+e}function ck(e){return Math.floor(+e/1e3)}var ws,dk,fk;XL({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function XL(e){return ws=XA(e),dk=ws.format,ws.parse,fk=ws.utcFormat,ws.utcParse,ws}function JL(e){return new Date(e)}function ZL(e){return e instanceof Date?+e:+new Date(+e)}function Bp(e,t,n,r,i,a,s,o,l,u){var c=_p(),d=c.invert,f=c.domain,g=u(".%L"),p=u(":%S"),m=u("%I:%M"),v=u("%I %p"),x=u("%a %d"),y=u("%b %d"),b=u("%B"),k=u("%Y");function w(S){return(l(S)<S?g:o(S)<S?p:s(S)<S?m:a(S)<S?v:r(S)<S?i(S)<S?x:y:n(S)<S?b:k)(S)}return c.invert=function(S){return new Date(d(S))},c.domain=function(S){return arguments.length?f(Array.from(S,ZL)):f().map(JL)},c.ticks=function(S){var N=f();return e(N[0],N[N.length-1],S??10)},c.tickFormat=function(S,N){return N==null?w:u(N)},c.nice=function(S){var N=f();return(!S||typeof S.range!="function")&&(S=t(N[0],N[N.length-1],S??10)),S?f(Sw(N,S)):c},c.copy=function(){return zo(c,Bp(e,t,n,r,i,a,s,o,l,u))},c}function hk(){return Ln.apply(Bp(Gw,Xw,sr,Ko,ma,pa,Uo,Bo,ar,dk).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function pk(){return Ln.apply(Bp(Kw,Yw,or,Yo,xa,_s,Ho,Wo,ar,fk).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function hc(){var e=0,t=1,n,r,i,a,s=Qt,o=!1,l;function u(d){return d==null||isNaN(d=+d)?l:s(i===0?.5:(d=(a(d)-n)*i,o?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([e,t]=d,n=a(e=+e),r=a(t=+t),i=n===r?0:1/(r-n),u):[e,t]},u.clamp=function(d){return arguments.length?(o=!!d,u):o},u.interpolator=function(d){return arguments.length?(s=d,u):s};function c(d){return function(f){var g,p;return arguments.length?([g,p]=f,s=d(g,p),u):[s(0),s(1)]}}return u.range=c(ha),u.rangeRound=c(Fo),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return a=d,n=d(e),r=d(t),i=n===r?0:1/(r-n),u}}function wi(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function gk(){var e=_i(hc()(Qt));return e.copy=function(){return wi(e,gk())},Qr.apply(e,arguments)}function mk(){var e=Np(hc()).domain([1,10]);return e.copy=function(){return wi(e,mk()).base(e.base())},Qr.apply(e,arguments)}function vk(){var e=Tp(hc());return e.copy=function(){return wi(e,vk()).constant(e.constant())},Qr.apply(e,arguments)}function Wp(){var e=Mp(hc());return e.copy=function(){return wi(e,Wp()).exponent(e.exponent())},Qr.apply(e,arguments)}function QL(){return Wp.apply(null,arguments).exponent(.5)}function yk(){var e=[],t=Qt;function n(r){if(r!=null&&!isNaN(r=+r))return t(($o(e,r,1)-1)/(e.length-1))}return n.domain=function(r){if(!arguments.length)return e.slice();e=[];for(let i of r)i!=null&&!isNaN(i=+i)&&e.push(i);return e.sort(xi),n},n.interpolator=function(r){return arguments.length?(t=r,n):t},n.range=function(){return e.map((r,i)=>t(i/(e.length-1)))},n.quantiles=function(r){return Array.from({length:r+1},(i,a)=>NP(e,a/r))},n.copy=function(){return yk(t).domain(e)},Qr.apply(n,arguments)}function pc(){var e=0,t=.5,n=1,r=1,i,a,s,o,l,u=Qt,c,d=!1,f;function g(m){return isNaN(m=+m)?f:(m=.5+((m=+c(m))-a)*(r*m<r*a?o:l),u(d?Math.max(0,Math.min(1,m)):m))}g.domain=function(m){return arguments.length?([e,t,n]=m,i=c(e=+e),a=c(t=+t),s=c(n=+n),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),r=a<i?-1:1,g):[e,t,n]},g.clamp=function(m){return arguments.length?(d=!!m,g):d},g.interpolator=function(m){return arguments.length?(u=m,g):u};function p(m){return function(v){var x,y,b;return arguments.length?([x,y,b]=v,u=hw(m,[x,y,b]),g):[u(0),u(.5),u(1)]}}return g.range=p(ha),g.rangeRound=p(Fo),g.unknown=function(m){return arguments.length?(f=m,g):f},function(m){return c=m,i=m(e),a=m(t),s=m(n),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),r=a<i?-1:1,g}}function xk(){var e=_i(pc()(Qt));return e.copy=function(){return wi(e,xk())},Qr.apply(e,arguments)}function bk(){var e=Np(pc()).domain([.1,1,10]);return e.copy=function(){return wi(e,bk()).base(e.base())},Qr.apply(e,arguments)}function _k(){var e=Tp(pc());return e.copy=function(){return wi(e,_k()).constant(e.constant())},Qr.apply(e,arguments)}function Up(){var e=Mp(pc());return e.copy=function(){return wi(e,Up()).exponent(e.exponent())},Qr.apply(e,arguments)}function eD(){return Up.apply(null,arguments).exponent(.5)}const tD=Object.freeze(Object.defineProperty({__proto__:null,scaleBand:Ju,scaleDiverging:xk,scaleDivergingLog:bk,scaleDivergingPow:Up,scaleDivergingSqrt:eD,scaleDivergingSymlog:_k,scaleIdentity:kw,scaleImplicit:rp,scaleLinear:Sp,scaleLog:Ep,scaleOrdinal:Xu,scalePoint:b_,scalePow:fc,scaleQuantile:Op,scaleQuantize:$p,scaleRadial:jp,scaleSequential:gk,scaleSequentialLog:mk,scaleSequentialPow:Wp,scaleSequentialQuantile:yk,scaleSequentialSqrt:QL,scaleSequentialSymlog:vk,scaleSqrt:Ow,scaleSymlog:Cp,scaleThreshold:Pp,scaleTime:hk,scaleUtc:pk,tickFormat:ww},Symbol.toStringTag,{value:"Module"}));function nD(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}function rD(e,t){t.range&&("padding"in e,e.range(t.range))}function iD(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}function aD(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}function sD(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}function oD(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}function lD(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}const uD=Object.freeze(Object.defineProperty({__proto__:null,interpolate:ha,interpolateArray:HP,interpolateBasis:H_,interpolateBasisClosed:q_,interpolateCubehelix:dw,interpolateCubehelixLong:fw,interpolateDate:X_,interpolateDiscrete:KP,interpolateHcl:lw,interpolateHclLong:uw,interpolateHsl:iw,interpolateHslLong:aw,interpolateHue:YP,interpolateLab:sw,interpolateNumber:ir,interpolateNumberArray:mp,interpolateObject:J_,interpolateRgb:sc,interpolateRgbBasis:WP,interpolateRgbBasisClosed:UP,interpolateRound:Fo,interpolateString:Z_,interpolateTransformCss:JP,interpolateTransformSvg:ZP,interpolateZoom:nA,piecewise:hw,quantize:rA},Symbol.toStringTag,{value:"Module"}));var wk={lab:sw,hcl:lw,"hcl-long":uw,hsl:iw,"hsl-long":aw,cubehelix:dw,"cubehelix-long":fw,rgb:sc};function cD(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return wk[e]}var t=e.type,n=e.gamma,r=wk[t];return typeof n>"u"?r:r.gamma(n)}function dD(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=cD(t.interpolate);e.interpolate(n)}}const fD=Object.freeze(Object.defineProperty({__proto__:null,timeDay:pa,timeDays:OA,timeFriday:Fw,timeFridays:FA,timeHour:Uo,timeHours:MA,timeInterval:xt,timeMillisecond:bs,timeMilliseconds:Pw,timeMinute:Bo,timeMinutes:TA,timeMonday:qo,timeMondays:AA,timeMonth:Ko,timeMonths:VA,timeSaturday:zw,timeSaturdays:zA,timeSecond:ar,timeSeconds:Lw,timeSunday:ma,timeSundays:Rw,timeThursday:va,timeThursdays:IA,timeTickInterval:Xw,timeTicks:Gw,timeTuesday:Dw,timeTuesdays:LA,timeWednesday:Iw,timeWednesdays:DA,timeWeek:ma,timeWeeks:Rw,timeYear:sr,timeYears:YA,unixDay:Fp,unixDays:PA,utcDay:_s,utcDays:$A,utcFriday:Uw,utcFridays:HA,utcHour:Ho,utcHours:jA,utcMillisecond:bs,utcMilliseconds:Pw,utcMinute:Wo,utcMinutes:CA,utcMonday:Vo,utcMondays:RA,utcMonth:Yo,utcMonths:KA,utcSaturday:Hw,utcSaturdays:qA,utcSecond:ar,utcSeconds:Lw,utcSunday:xa,utcSundays:qw,utcThursday:ba,utcThursdays:UA,utcTickInterval:Yw,utcTicks:Kw,utcTuesday:Bw,utcTuesdays:BA,utcWednesday:Ww,utcWednesdays:WA,utcWeek:xa,utcWeeks:qw,utcYear:or,utcYears:GA},Symbol.toStringTag,{value:"Module"}));var hD=new Date(Date.UTC(2020,1,2,3,4,5)),pD="%Y-%m-%d %H:%M";function kk(e){var t=e.tickFormat(1,pD)(hD);return t==="2020-02-02 03:04"}var Sk={day:pa,hour:Uo,minute:Bo,month:Ko,second:ar,week:ma,year:sr},Nk={day:_s,hour:Ho,minute:Wo,month:Yo,second:ar,week:xa,year:or};function gD(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,i=kk(r);if(typeof n=="string")r.nice(i?Nk[n]:Sk[n]);else{var a=n.interval,s=n.step,o=(i?Nk[a]:Sk[a]).every(s);o!=null&&r.nice(o)}}}}function mD(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}function vD(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}function yD(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(Fo))}function xD(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}function bD(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],i=n[1],a=i<r,s=a?[i,r]:[r,i],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(a?u.reverse():u)}}var Ek=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"],_D={domain:nD,nice:gD,zero:bD,interpolate:dD,round:yD,align:iD,base:aD,clamp:sD,constant:oD,exponent:lD,padding:mD,range:rD,reverse:vD,unknown:xD};function en(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),i=Ek.filter(function(a){return r.has(a)});return function(s,o){return typeof o<"u"&&i.forEach(function(l){_D[l](s,o)}),s}}var wD=en("domain","range","reverse","align","padding","round");function lr(e){return wD(Ju(),e)}var kD=en("domain","range","reverse","align","padding","round");function Tk(e){return kD(b_(),e)}var SD=en("domain","range","reverse","clamp","interpolate","nice","round","zero");function In(e){return SD(Sp(),e)}var ND=en("domain","range","clamp","nice","round","unknown");function ED(e){return ND(jp(),e)}var TD=en("domain","range","reverse","clamp","interpolate","nice","round");function Ck(e){return TD(hk(),e)}var CD=en("domain","range","reverse","clamp","interpolate","nice","round");function Mk(e){return CD(pk(),e)}var MD=en("domain","range","reverse","base","clamp","interpolate","nice","round");function jk(e){return MD(Ep(),e)}var jD=en("domain","range","reverse","clamp","exponent","interpolate","nice","round","zero");function Ok(e){return jD(fc(),e)}var OD=en("domain","range","reverse","unknown");function Hp(e){return OD(Xu(),e)}var $D=en("domain","range","reverse","nice","zero");function $k(e){return $D($p(),e)}var PD=en("domain","range","reverse");function Pk(e){return PD(Op(),e)}var AD=en("domain","range","reverse","clamp","constant","nice","zero","round");function Ak(e){return AD(Cp(),e)}var LD=en("domain","range","reverse");function Lk(e){return LD(Pp(),e)}var DD=en("domain","range","reverse","clamp","interpolate","nice","round","zero");function Dk(e){return DD(Ow(),e)}function Zo(e){if(typeof e<"u"&&"type"in e)switch(e.type){case"linear":return In(e);case"log":return jk(e);case"pow":return Ok(e);case"sqrt":return Dk(e);case"symlog":return Ak(e);case"time":return Ck(e);case"utc":return Mk(e);case"quantile":return Pk(e);case"quantize":return $k(e);case"threshold":return Lk(e);case"ordinal":return Hp(e);case"point":return Tk(e);case"band":return lr(e)}return In(e)}var ID=en.apply(void 0,Ek);function FD(e,t){return ID(e.copy(),t)}function zD(e){return"paddingInner"in e?"band":"padding"in e?"point":"quantiles"in e?"quantile":"base"in e?"log":"exponent"in e?e.exponent()===.5?"sqrt":"pow":"constant"in e?"symlog":"clamp"in e?e.ticks()[0]instanceof Date?kk(e)?"utc":"time":"linear":"nice"in e?"quantize":"invertExtent"in e?"threshold":"ordinal"}function Ik(e){if((typeof e=="function"||typeof e=="object"&&e)&&"valueOf"in e){var t=e.valueOf();if(typeof t=="number")return t}return e}function Fk(e,t){var n=e;return"ticks"in n?n.ticks(t):n.domain().filter(function(r,i,a){return t==null||a.length<=t||i%Math.round((a.length-1)/t)===0})}function zk(e){return e==null?void 0:e.toString()}var RD=new Set(["linear","pow","quantize","sqrt","symlog"]);function qp(e){return RD.has(e.type)}const BD=Object.freeze(Object.defineProperty({__proto__:null,coerceNumber:Ik,createScale:Zo,getTicks:Fk,inferScaleType:zD,scaleBand:lr,scaleCanBeZeroed:qp,scaleLinear:In,scaleLog:jk,scaleOrdinal:Hp,scalePoint:Tk,scalePower:Ok,scaleQuantile:Pk,scaleQuantize:$k,scaleRadial:ED,scaleSqrt:Dk,scaleSymlog:Ak,scaleThreshold:Lk,scaleTime:Ck,scaleUtc:Mk,toString:zk,updateScale:FD},Symbol.toStringTag,{value:"Module"}));var Vp=Math.PI,Kp=2*Vp,_a=1e-6,WD=Kp-_a;function Yp(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function hn(){return new Yp}Yp.prototype=hn.prototype={constructor:Yp,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,n,r){this._+="Q"+ +e+","+ +t+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(e,t,n,r,i,a){this._+="C"+ +e+","+ +t+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,t,n,r,i){e=+e,t=+t,n=+n,r=+r,i=+i;var a=this._x1,s=this._y1,o=n-e,l=r-t,u=a-e,c=s-t,d=u*u+c*c;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=e)+","+(this._y1=t);else if(d>_a)if(!(Math.abs(c*o-l*u)>_a)||!i)this._+="L"+(this._x1=e)+","+(this._y1=t);else{var f=n-a,g=r-s,p=o*o+l*l,m=f*f+g*g,v=Math.sqrt(p),x=Math.sqrt(d),y=i*Math.tan((Vp-Math.acos((p+d-m)/(2*v*x)))/2),b=y/x,k=y/v;Math.abs(b-1)>_a&&(this._+="L"+(e+b*u)+","+(t+b*c)),this._+="A"+i+","+i+",0,0,"+ +(c*f>u*g)+","+(this._x1=e+k*o)+","+(this._y1=t+k*l)}},arc:function(e,t,n,r,i,a){e=+e,t=+t,n=+n,a=!!a;var s=n*Math.cos(r),o=n*Math.sin(r),l=e+s,u=t+o,c=1^a,d=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>_a||Math.abs(this._y1-u)>_a)&&(this._+="L"+l+","+u),n&&(d<0&&(d=d%Kp+Kp),d>WD?this._+="A"+n+","+n+",0,1,"+c+","+(e-s)+","+(t-o)+"A"+n+","+n+",0,1,"+c+","+(this._x1=l)+","+(this._y1=u):d>_a&&(this._+="A"+n+","+n+",0,"+ +(d>=Vp)+","+c+","+(this._x1=e+n*Math.cos(i))+","+(this._y1=t+n*Math.sin(i))))},rect:function(e,t,n,r){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};function Pe(e){return function(){return e}}var Rk=Math.abs,Gt=Math.atan2,wa=Math.cos,UD=Math.max,Gp=Math.min,Cr=Math.sin,ks=Math.sqrt,Xt=1e-12,ki=Math.PI,gc=ki/2,Si=2*ki;function HD(e){return e>1?0:e<-1?ki:Math.acos(e)}function Bk(e){return e>=1?gc:e<=-1?-gc:Math.asin(e)}function qD(e){return e.innerRadius}function VD(e){return e.outerRadius}function KD(e){return e.startAngle}function YD(e){return e.endAngle}function GD(e){return e&&e.padAngle}function XD(e,t,n,r,i,a,s,o){var l=n-e,u=r-t,c=s-i,d=o-a,f=d*l-c*u;if(!(f*f<Xt))return f=(c*(t-a)-d*(e-i))/f,[e+f*l,t+f*u]}function mc(e,t,n,r,i,a,s){var o=e-n,l=t-r,u=(s?a:-a)/ks(o*o+l*l),c=u*l,d=-u*o,f=e+c,g=t+d,p=n+c,m=r+d,v=(f+p)/2,x=(g+m)/2,y=p-f,b=m-g,k=y*y+b*b,w=i-a,S=f*m-p*g,N=(b<0?-1:1)*ks(UD(0,w*w*k-S*S)),E=(S*b-y*N)/k,T=(-S*y-b*N)/k,C=(S*b+y*N)/k,O=(-S*y+b*N)/k,$=E-v,M=T-x,j=C-v,P=O-x;return $*$+M*M>j*j+P*P&&(E=C,T=O),{cx:E,cy:T,x01:-c,y01:-d,x11:E*(i/w-1),y11:T*(i/w-1)}}function Wk(){var e=qD,t=VD,n=Pe(0),r=null,i=KD,a=YD,s=GD,o=null;function l(){var u,c,d=+e.apply(this,arguments),f=+t.apply(this,arguments),g=i.apply(this,arguments)-gc,p=a.apply(this,arguments)-gc,m=Rk(p-g),v=p>g;if(o||(o=u=hn()),f<d&&(c=f,f=d,d=c),!(f>Xt))o.moveTo(0,0);else if(m>Si-Xt)o.moveTo(f*wa(g),f*Cr(g)),o.arc(0,0,f,g,p,!v),d>Xt&&(o.moveTo(d*wa(p),d*Cr(p)),o.arc(0,0,d,p,g,v));else{var x=g,y=p,b=g,k=p,w=m,S=m,N=s.apply(this,arguments)/2,E=N>Xt&&(r?+r.apply(this,arguments):ks(d*d+f*f)),T=Gp(Rk(f-d)/2,+n.apply(this,arguments)),C=T,O=T,$,M;if(E>Xt){var j=Bk(E/d*Cr(N)),P=Bk(E/f*Cr(N));(w-=j*2)>Xt?(j*=v?1:-1,b+=j,k-=j):(w=0,b=k=(g+p)/2),(S-=P*2)>Xt?(P*=v?1:-1,x+=P,y-=P):(S=0,x=y=(g+p)/2)}var F=f*wa(x),B=f*Cr(x),W=d*wa(k),q=d*Cr(k);if(T>Xt){var D=f*wa(y),A=f*Cr(y),U=d*wa(b),Y=d*Cr(b),G;if(m<ki&&(G=XD(F,B,U,Y,D,A,W,q))){var J=F-G[0],R=B-G[1],K=D-G[0],Z=A-G[1],z=1/Cr(HD((J*K+R*Z)/(ks(J*J+R*R)*ks(K*K+Z*Z)))/2),X=ks(G[0]*G[0]+G[1]*G[1]);C=Gp(T,(d-X)/(z-1)),O=Gp(T,(f-X)/(z+1))}}S>Xt?O>Xt?($=mc(U,Y,F,B,f,O,v),M=mc(D,A,W,q,f,O,v),o.moveTo($.cx+$.x01,$.cy+$.y01),O<T?o.arc($.cx,$.cy,O,Gt($.y01,$.x01),Gt(M.y01,M.x01),!v):(o.arc($.cx,$.cy,O,Gt($.y01,$.x01),Gt($.y11,$.x11),!v),o.arc(0,0,f,Gt($.cy+$.y11,$.cx+$.x11),Gt(M.cy+M.y11,M.cx+M.x11),!v),o.arc(M.cx,M.cy,O,Gt(M.y11,M.x11),Gt(M.y01,M.x01),!v))):(o.moveTo(F,B),o.arc(0,0,f,x,y,!v)):o.moveTo(F,B),!(d>Xt)||!(w>Xt)?o.lineTo(W,q):C>Xt?($=mc(W,q,D,A,d,-C,v),M=mc(F,B,U,Y,d,-C,v),o.lineTo($.cx+$.x01,$.cy+$.y01),C<T?o.arc($.cx,$.cy,C,Gt($.y01,$.x01),Gt(M.y01,M.x01),!v):(o.arc($.cx,$.cy,C,Gt($.y01,$.x01),Gt($.y11,$.x11),!v),o.arc(0,0,d,Gt($.cy+$.y11,$.cx+$.x11),Gt(M.cy+M.y11,M.cx+M.x11),v),o.arc(M.cx,M.cy,C,Gt(M.y11,M.x11),Gt(M.y01,M.x01),!v))):o.arc(0,0,d,k,b,v)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,c=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-ki/2;return[wa(c)*u,Cr(c)*u]},l.innerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:Pe(+u),l):e},l.outerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:Pe(+u),l):t},l.cornerRadius=function(u){return arguments.length?(n=typeof u=="function"?u:Pe(+u),l):n},l.padRadius=function(u){return arguments.length?(r=u==null?null:typeof u=="function"?u:Pe(+u),l):r},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:Pe(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:Pe(+u),l):a},l.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:Pe(+u),l):s},l.context=function(u){return arguments.length?(o=u??null,l):o},l}function Uk(e){this._context=e}Uk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function vc(e){return new Uk(e)}function Xp(e){return e[0]}function Jp(e){return e[1]}function yc(){var e=Xp,t=Jp,n=Pe(!0),r=null,i=vc,a=null;function s(o){var l,u=o.length,c,d=!1,f;for(r==null&&(a=i(f=hn())),l=0;l<=u;++l)!(l<u&&n(c=o[l],l,o))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(c,l,o),+t(c,l,o));if(f)return a=null,f+""||null}return s.x=function(o){return arguments.length?(e=typeof o=="function"?o:Pe(+o),s):e},s.y=function(o){return arguments.length?(t=typeof o=="function"?o:Pe(+o),s):t},s.defined=function(o){return arguments.length?(n=typeof o=="function"?o:Pe(!!o),s):n},s.curve=function(o){return arguments.length?(i=o,r!=null&&(a=i(r)),s):i},s.context=function(o){return arguments.length?(o==null?r=a=null:a=i(r=o),s):r},s}function Zp(){var e=Xp,t=null,n=Pe(0),r=Jp,i=Pe(!0),a=null,s=vc,o=null;function l(c){var d,f,g,p=c.length,m,v=!1,x,y=new Array(p),b=new Array(p);for(a==null&&(o=s(x=hn())),d=0;d<=p;++d){if(!(d<p&&i(m=c[d],d,c))===v)if(v=!v)f=d,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),g=d-1;g>=f;--g)o.point(y[g],b[g]);o.lineEnd(),o.areaEnd()}v&&(y[d]=+e(m,d,c),b[d]=+n(m,d,c),o.point(t?+t(m,d,c):y[d],r?+r(m,d,c):b[d]))}if(x)return o=null,x+""||null}function u(){return yc().defined(i).curve(s).context(a)}return l.x=function(c){return arguments.length?(e=typeof c=="function"?c:Pe(+c),t=null,l):e},l.x0=function(c){return arguments.length?(e=typeof c=="function"?c:Pe(+c),l):e},l.x1=function(c){return arguments.length?(t=c==null?null:typeof c=="function"?c:Pe(+c),l):t},l.y=function(c){return arguments.length?(n=typeof c=="function"?c:Pe(+c),r=null,l):n},l.y0=function(c){return arguments.length?(n=typeof c=="function"?c:Pe(+c),l):n},l.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:Pe(+c),l):r},l.lineX0=l.lineY0=function(){return u().x(e).y(n)},l.lineY1=function(){return u().x(e).y(r)},l.lineX1=function(){return u().x(t).y(n)},l.defined=function(c){return arguments.length?(i=typeof c=="function"?c:Pe(!!c),l):i},l.curve=function(c){return arguments.length?(s=c,a!=null&&(o=s(a)),l):s},l.context=function(c){return arguments.length?(c==null?a=o=null:o=s(a=c),l):a},l}function JD(e,t){return t<e?-1:t>e?1:t>=e?0:NaN}function ZD(e){return e}function Hk(){var e=ZD,t=JD,n=null,r=Pe(0),i=Pe(Si),a=Pe(0);function s(o){var l,u=o.length,c,d,f=0,g=new Array(u),p=new Array(u),m=+r.apply(this,arguments),v=Math.min(Si,Math.max(-Si,i.apply(this,arguments)-m)),x,y=Math.min(Math.abs(v)/u,a.apply(this,arguments)),b=y*(v<0?-1:1),k;for(l=0;l<u;++l)(k=p[g[l]=l]=+e(o[l],l,o))>0&&(f+=k);for(t!=null?g.sort(function(w,S){return t(p[w],p[S])}):n!=null&&g.sort(function(w,S){return n(o[w],o[S])}),l=0,d=f?(v-u*b)/f:0;l<u;++l,m=x)c=g[l],k=p[c],x=m+(k>0?k*d:0)+b,p[c]={data:o[c],index:l,value:k,startAngle:m,endAngle:x,padAngle:y};return p}return s.value=function(o){return arguments.length?(e=typeof o=="function"?o:Pe(+o),s):e},s.sortValues=function(o){return arguments.length?(t=o,n=null,s):t},s.sort=function(o){return arguments.length?(n=o,t=null,s):n},s.startAngle=function(o){return arguments.length?(r=typeof o=="function"?o:Pe(+o),s):r},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Pe(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:Pe(+o),s):a},s}var qk=Qp(vc);function Vk(e){this._curve=e}Vk.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),t*-Math.cos(e))}};function Qp(e){function t(n){return new Vk(e(n))}return t._curve=e,t}function Qo(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(n){return arguments.length?t(Qp(n)):t()._curve},e}function eg(){return Qo(yc().curve(qk))}function Kk(){var e=Zp().curve(qk),t=e.curve,n=e.lineX0,r=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return Qo(n())},delete e.lineX0,e.lineEndAngle=function(){return Qo(r())},delete e.lineX1,e.lineInnerRadius=function(){return Qo(i())},delete e.lineY0,e.lineOuterRadius=function(){return Qo(a())},delete e.lineY1,e.curve=function(s){return arguments.length?t(Qp(s)):t()._curve},e}function el(e,t){return[(t=+t)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}var tg=Array.prototype.slice;function QD(e){return e.source}function eI(e){return e.target}function ng(e){var t=QD,n=eI,r=Xp,i=Jp,a=null;function s(){var o,l=tg.call(arguments),u=t.apply(this,l),c=n.apply(this,l);if(a||(a=o=hn()),e(a,+r.apply(this,(l[0]=u,l)),+i.apply(this,l),+r.apply(this,(l[0]=c,l)),+i.apply(this,l)),o)return a=null,o+""||null}return s.source=function(o){return arguments.length?(t=o,s):t},s.target=function(o){return arguments.length?(n=o,s):n},s.x=function(o){return arguments.length?(r=typeof o=="function"?o:Pe(+o),s):r},s.y=function(o){return arguments.length?(i=typeof o=="function"?o:Pe(+o),s):i},s.context=function(o){return arguments.length?(a=o??null,s):a},s}function tI(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t=(t+r)/2,n,t,i,r,i)}function nI(e,t,n,r,i){e.moveTo(t,n),e.bezierCurveTo(t,n=(n+i)/2,r,n,r,i)}function rI(e,t,n,r,i){var a=el(t,n),s=el(t,n=(n+i)/2),o=el(r,n),l=el(r,i);e.moveTo(a[0],a[1]),e.bezierCurveTo(s[0],s[1],o[0],o[1],l[0],l[1])}function Yk(){return ng(tI)}function Gk(){return ng(nI)}function Xk(){var e=ng(rI);return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e}const rg={draw:function(e,t){var n=Math.sqrt(t/ki);e.moveTo(n,0),e.arc(0,0,n,0,Si)}},Jk={draw:function(e,t){var n=Math.sqrt(t/5)/2;e.moveTo(-3*n,-n),e.lineTo(-n,-n),e.lineTo(-n,-3*n),e.lineTo(n,-3*n),e.lineTo(n,-n),e.lineTo(3*n,-n),e.lineTo(3*n,n),e.lineTo(n,n),e.lineTo(n,3*n),e.lineTo(-n,3*n),e.lineTo(-n,n),e.lineTo(-3*n,n),e.closePath()}};var Zk=Math.sqrt(1/3),iI=Zk*2;const Qk={draw:function(e,t){var n=Math.sqrt(t/iI),r=n*Zk;e.moveTo(0,-n),e.lineTo(r,0),e.lineTo(0,n),e.lineTo(-r,0),e.closePath()}};var aI=.8908130915292852,eS=Math.sin(ki/10)/Math.sin(7*ki/10),sI=Math.sin(Si/10)*eS,oI=-Math.cos(Si/10)*eS;const tS={draw:function(e,t){var n=Math.sqrt(t*aI),r=sI*n,i=oI*n;e.moveTo(0,-n),e.lineTo(r,i);for(var a=1;a<5;++a){var s=Si*a/5,o=Math.cos(s),l=Math.sin(s);e.lineTo(l*n,-o*n),e.lineTo(o*r-l*i,l*r+o*i)}e.closePath()}},nS={draw:function(e,t){var n=Math.sqrt(t),r=-n/2;e.rect(r,r,n,n)}};var ig=Math.sqrt(3);const rS={draw:function(e,t){var n=-Math.sqrt(t/(ig*3));e.moveTo(0,n*2),e.lineTo(-ig*n,-n),e.lineTo(ig*n,-n),e.closePath()}};var Fn=-.5,zn=Math.sqrt(3)/2,ag=1/Math.sqrt(12),lI=(ag/2+1)*3;const iS={draw:function(e,t){var n=Math.sqrt(t/lI),r=n/2,i=n*ag,a=r,s=n*ag+n,o=-a,l=s;e.moveTo(r,i),e.lineTo(a,s),e.lineTo(o,l),e.lineTo(Fn*r-zn*i,zn*r+Fn*i),e.lineTo(Fn*a-zn*s,zn*a+Fn*s),e.lineTo(Fn*o-zn*l,zn*o+Fn*l),e.lineTo(Fn*r+zn*i,Fn*i-zn*r),e.lineTo(Fn*a+zn*s,Fn*s-zn*a),e.lineTo(Fn*o+zn*l,Fn*l-zn*o),e.closePath()}};var uI=[rg,Jk,Qk,nS,tS,rS,iS];function cI(){var e=Pe(rg),t=Pe(64),n=null;function r(){var i;if(n||(n=i=hn()),e.apply(this,arguments).draw(n,+t.apply(this,arguments)),i)return n=null,i+""||null}return r.type=function(i){return arguments.length?(e=typeof i=="function"?i:Pe(i),r):e},r.size=function(i){return arguments.length?(t=typeof i=="function"?i:Pe(+i),r):t},r.context=function(i){return arguments.length?(n=i??null,r):n},r}function Ni(){}function xc(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function bc(e){this._context=e}bc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:xc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:xc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dI(e){return new bc(e)}function aS(e){this._context=e}aS.prototype={areaStart:Ni,areaEnd:Ni,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:xc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function fI(e){return new aS(e)}function sS(e){this._context=e}sS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:xc(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function hI(e){return new sS(e)}function oS(e,t){this._basis=new bc(e),this._beta=t}oS.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,s=t[n]-i,o=-1,l;++o<=n;)l=o/n,this._basis.point(this._beta*e[o]+(1-this._beta)*(r+l*a),this._beta*t[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const pI=function e(t){function n(r){return t===1?new bc(r):new oS(r,t)}return n.beta=function(r){return e(+r)},n}(.85);function _c(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function sg(e,t){this._context=e,this._k=(1-t)/6}sg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:_c(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:_c(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const gI=function e(t){function n(r){return new sg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function og(e,t){this._context=e,this._k=(1-t)/6}og.prototype={areaStart:Ni,areaEnd:Ni,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:_c(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const mI=function e(t){function n(r){return new og(r,t)}return n.tension=function(r){return e(+r)},n}(0);function lg(e,t){this._context=e,this._k=(1-t)/6}lg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:_c(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const vI=function e(t){function n(r){return new lg(r,t)}return n.tension=function(r){return e(+r)},n}(0);function ug(e,t,n){var r=e._x1,i=e._y1,a=e._x2,s=e._y2;if(e._l01_a>Xt){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>Xt){var u=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,c=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*u+e._x1*e._l23_2a-t*e._l12_2a)/c,s=(s*u+e._y1*e._l23_2a-n*e._l12_2a)/c}e._context.bezierCurveTo(r,i,a,s,e._x2,e._y2)}function lS(e,t){this._context=e,this._alpha=t}lS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ug(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const yI=function e(t){function n(r){return t?new lS(r,t):new sg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function uS(e,t){this._context=e,this._alpha=t}uS.prototype={areaStart:Ni,areaEnd:Ni,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ug(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const xI=function e(t){function n(r){return t?new uS(r,t):new og(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function cS(e,t){this._context=e,this._alpha=t}cS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ug(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const bI=function e(t){function n(r){return t?new cS(r,t):new lg(r,0)}return n.alpha=function(r){return e(+r)},n}(.5);function dS(e){this._context=e}dS.prototype={areaStart:Ni,areaEnd:Ni,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function _I(e){return new dS(e)}function fS(e){return e<0?-1:1}function hS(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),s=(n-e._y1)/(i||r<0&&-0),o=(a*i+s*r)/(r+i);return(fS(a)+fS(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function pS(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function cg(e,t,n){var r=e._x0,i=e._y0,a=e._x1,s=e._y1,o=(a-r)/3;e._context.bezierCurveTo(r+o,i+o*t,a-o,s-o*n,a,s)}function wc(e){this._context=e}wc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:cg(this,this._t0,pS(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,cg(this,pS(this,n=hS(this,e,t)),n);break;default:cg(this,this._t0,n=hS(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function gS(e){this._context=new mS(e)}(gS.prototype=Object.create(wc.prototype)).point=function(e,t){wc.prototype.point.call(this,t,e)};function mS(e){this._context=e}mS.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function wI(e){return new wc(e)}function kI(e){return new gS(e)}function vS(e){this._context=e}vS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=yS(e),i=yS(t),a=0,s=1;s<n;++a,++s)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[s],t[s]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function yS(e){var t,n=e.length-1,r,i=new Array(n),a=new Array(n),s=new Array(n);for(i[0]=0,a[0]=2,s[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,s[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,s[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,s[t]-=r*s[t-1];for(i[n-1]=s[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(s[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function SI(e){return new vS(e)}function kc(e,t){this._context=e,this._t=t}kc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}}this._x=e,this._y=t}};function NI(e){return new kc(e,.5)}function EI(e){return new kc(e,0)}function TI(e){return new kc(e,1)}function ka(e,t){if((s=e.length)>1)for(var n=1,r,i,a=e[t[0]],s,o=a.length;n<s;++n)for(i=a,a=e[t[n]],r=0;r<o;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Sa(e){for(var t=e.length,n=new Array(t);--t>=0;)n[t]=t;return n}function CI(e,t){return e[t]}function Sc(){var e=Pe([]),t=Sa,n=ka,r=CI;function i(a){var s=e.apply(this,arguments),o,l=a.length,u=s.length,c=new Array(u),d;for(o=0;o<u;++o){for(var f=s[o],g=c[o]=new Array(l),p=0,m;p<l;++p)g[p]=m=[0,+r(a[p],f,p,a)],m.data=a[p];g.key=f}for(o=0,d=t(c);o<u;++o)c[d[o]].index=o;return n(c,d),c}return i.keys=function(a){return arguments.length?(e=typeof a=="function"?a:Pe(tg.call(a)),i):e},i.value=function(a){return arguments.length?(r=typeof a=="function"?a:Pe(+a),i):r},i.order=function(a){return arguments.length?(t=a==null?Sa:typeof a=="function"?a:Pe(tg.call(a)),i):t},i.offset=function(a){return arguments.length?(n=a??ka,i):n},i}function xS(e,t){if((r=e.length)>0){for(var n,r,i=0,a=e[0].length,s;i<a;++i){for(s=n=0;n<r;++n)s+=e[n][i][1]||0;if(s)for(n=0;n<r;++n)e[n][i][1]/=s}ka(e,t)}}function bS(e,t){if((l=e.length)>0)for(var n,r=0,i,a,s,o,l,u=e[t[0]].length;r<u;++r)for(s=o=0,n=0;n<l;++n)(a=(i=e[t[n]][r])[1]-i[0])>0?(i[0]=s,i[1]=s+=a):a<0?(i[1]=o,i[0]=o+=a):(i[0]=0,i[1]=a)}function _S(e,t){if((i=e.length)>0){for(var n=0,r=e[t[0]],i,a=r.length;n<a;++n){for(var s=0,o=0;s<i;++s)o+=e[s][n][1]||0;r[n][1]+=r[n][0]=-o/2}ka(e,t)}}function wS(e,t){if(!(!((s=e.length)>0)||!((a=(i=e[t[0]]).length)>0))){for(var n=0,r=1,i,a,s;r<a;++r){for(var o=0,l=0,u=0;o<s;++o){for(var c=e[t[o]],d=c[r][1]||0,f=c[r-1][1]||0,g=(d-f)/2,p=0;p<o;++p){var m=e[t[p]],v=m[r][1]||0,x=m[r-1][1]||0;g+=v-x}l+=d,u+=g*d}i[r-1][1]+=i[r-1][0]=n,l&&(n-=u/l)}i[r-1][1]+=i[r-1][0]=n,ka(e,t)}}function kS(e){var t=e.map(MI);return Sa(e).sort(function(n,r){return t[n]-t[r]})}function MI(e){for(var t=-1,n=0,r=e.length,i,a=-1/0;++t<r;)(i=+e[t][1])>a&&(a=i,n=t);return n}function dg(e){var t=e.map(SS);return Sa(e).sort(function(n,r){return t[n]-t[r]})}function SS(e){for(var t=0,n=-1,r=e.length,i;++n<r;)(i=+e[n][1])&&(t+=i);return t}function NS(e){return dg(e).reverse()}function ES(e){var t=e.length,n,r,i=e.map(SS),a=kS(e),s=0,o=0,l=[],u=[];for(n=0;n<t;++n)r=a[n],s<o?(s+=i[r],l.push(r)):(o+=i[r],u.push(r));return u.reverse().concat(l)}function TS(e){return Sa(e).reverse()}const jI=Object.freeze(Object.defineProperty({__proto__:null,arc:Wk,area:Zp,areaRadial:Kk,curveBasis:dI,curveBasisClosed:fI,curveBasisOpen:hI,curveBundle:pI,curveCardinal:gI,curveCardinalClosed:mI,curveCardinalOpen:vI,curveCatmullRom:yI,curveCatmullRomClosed:xI,curveCatmullRomOpen:bI,curveLinear:vc,curveLinearClosed:_I,curveMonotoneX:wI,curveMonotoneY:kI,curveNatural:SI,curveStep:NI,curveStepAfter:TI,curveStepBefore:EI,line:yc,lineRadial:eg,linkHorizontal:Yk,linkRadial:Xk,linkVertical:Gk,pie:Hk,pointRadial:el,radialArea:Kk,radialLine:eg,stack:Sc,stackOffsetDiverging:bS,stackOffsetExpand:xS,stackOffsetNone:ka,stackOffsetSilhouette:_S,stackOffsetWiggle:wS,stackOrderAppearance:kS,stackOrderAscending:dg,stackOrderDescending:NS,stackOrderInsideOut:ES,stackOrderNone:Sa,stackOrderReverse:TS,symbol:cI,symbolCircle:rg,symbolCross:Jk,symbolDiamond:Qk,symbolSquare:nS,symbolStar:tS,symbolTriangle:rS,symbolWye:iS,symbols:uI},Symbol.toStringTag,{value:"Module"}));function rt(e,t){e(t)}var Nc={ascending:dg,descending:NS,insideout:ES,none:Sa,reverse:TS},OI=Object.keys(Nc);function Ec(e){return e&&Nc[e]||Nc.none}var Tc={expand:xS,diverging:bS,none:ka,silhouette:_S,wiggle:wS},$I=Object.keys(Tc);function Cc(e){return e&&Tc[e]||Tc.none}function fg(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,i=t.cornerRadius,a=t.startAngle,s=t.endAngle,o=t.padAngle,l=t.padRadius,u=Wk();return n!=null&&rt(u.innerRadius,n),r!=null&&rt(u.outerRadius,r),i!=null&&rt(u.cornerRadius,i),a!=null&&rt(u.startAngle,a),s!=null&&rt(u.endAngle,s),o!=null&&rt(u.padAngle,o),l!=null&&rt(u.padRadius,l),u}function Mc(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,i=t.x1,a=t.y,s=t.y0,o=t.y1,l=t.defined,u=t.curve,c=Zp();return n&&rt(c.x,n),r&&rt(c.x0,r),i&&rt(c.x1,i),a&&rt(c.y,a),s&&rt(c.y0,s),o&&rt(c.y1,o),l&&c.defined(l),u&&c.curve(u),c}function hg(e){var t=e===void 0?{}:e,n=t.x,r=t.y,i=t.defined,a=t.curve,s=yc();return n&&rt(s.x,n),r&&rt(s.y,r),i&&s.defined(i),a&&s.curve(a),s}function CS(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,i=t.padAngle,a=t.value,s=t.sort,o=t.sortValues,l=Hk();return(s===null||s!=null)&&l.sort(s),(o===null||o!=null)&&l.sortValues(o),a!=null&&l.value(a),i!=null&&rt(l.padAngle,i),n!=null&&rt(l.startAngle,n),r!=null&&rt(l.endAngle,r),l}function MS(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,i=t.defined,a=t.curve,s=eg();return n&&rt(s.angle,n),r&&rt(s.radius,r),i&&s.defined(i),a&&s.curve(a),s}function jS(e){var t=e.keys,n=e.value,r=e.order,i=e.offset,a=Sc();return t&&a.keys(t),n&&rt(a.value,n),r&&a.order(Ec(r)),i&&a.offset(Cc(i)),a}var PI=["className","data","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","children","innerRef"];function pg(){return pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},pg.apply(this,arguments)}function AI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function LI(e){var t=e.className,n=e.data,r=e.innerRadius,i=e.outerRadius,a=e.cornerRadius,s=e.startAngle,o=e.endAngle,l=e.padAngle,u=e.padRadius,c=e.children,d=e.innerRef,f=AI(e,PI),g=fg({innerRadius:r,outerRadius:i,cornerRadius:a,startAngle:s,endAngle:o,padAngle:l,padRadius:u});return c?_.createElement(_.Fragment,null,c({path:g})):!n&&(s==null||o==null||r==null||i==null)?(console.warn("[@visx/shape/Arc]: expected data because one of startAngle, endAngle, innerRadius, outerRadius is undefined. Bailing."),null):_.createElement("path",pg({ref:d,className:$e("visx-arc",t),d:g(n)||""},f))}var DI=["className","top","left","data","centroid","innerRadius","outerRadius","cornerRadius","startAngle","endAngle","padAngle","padRadius","pieSort","pieSortValues","pieValue","children","fill"];function gg(){return gg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},gg.apply(this,arguments)}function II(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function OS(e){var t=e.className,n=e.top,r=e.left,i=e.data,a=i===void 0?[]:i,s=e.centroid,o=e.innerRadius,l=o===void 0?0:o,u=e.outerRadius,c=e.cornerRadius,d=e.startAngle,f=e.endAngle,g=e.padAngle,p=e.padRadius,m=e.pieSort,v=e.pieSortValues,x=e.pieValue,y=e.children,b=e.fill,k=b===void 0?"":b,w=II(e,DI),S=fg({innerRadius:l,outerRadius:u,cornerRadius:c,padRadius:p}),N=CS({startAngle:d,endAngle:f,padAngle:g,value:x,sort:m,sortValues:v}),E=N(a);return y?_.createElement(_.Fragment,null,y({arcs:E,path:S,pie:N})):_.createElement(ct,{className:"visx-pie-arcs-group",top:n,left:r},E.map(function(T,C){return _.createElement("g",{key:"pie-arc-"+C},_.createElement("path",gg({className:$e("visx-pie-arc",t),d:S(T)||"",fill:k==null||typeof k=="string"?k:k(T)},w)),s==null?void 0:s(S.centroid(T),T))}))}var FI=["from","to","fill","className","innerRef"];function mg(){return mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mg.apply(this,arguments)}function zI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function vg(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,i=r===void 0?{x:1,y:1}:r,a=e.fill,s=a===void 0?"transparent":a,o=e.className,l=e.innerRef,u=zI(e,FI),c=n.x===i.x||n.y===i.y;return _.createElement("line",mg({ref:l,className:$e("visx-line",o),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}var RI=["children","data","x","y","fill","className","curve","innerRef","defined"];function yg(){return yg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},yg.apply(this,arguments)}function BI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ss(e){var t=e.children,n=e.data,r=n===void 0?[]:n,i=e.x,a=e.y,s=e.fill,o=s===void 0?"transparent":s,l=e.className,u=e.curve,c=e.innerRef,d=e.defined,f=d===void 0?function(){return!0}:d,g=BI(e,RI),p=hg({x:i,y:a,defined:f,curve:u});return t?_.createElement(_.Fragment,null,t({path:p})):_.createElement("path",yg({ref:c,className:$e("visx-linepath",l),d:p(r)||"",fill:o,strokeLinecap:"round"},g))}var WI=["className","angle","radius","defined","curve","data","innerRef","children","fill"];function xg(){return xg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},xg.apply(this,arguments)}function UI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function HI(e){var t=e.className,n=e.angle,r=e.radius,i=e.defined,a=e.curve,s=e.data,o=s===void 0?[]:s,l=e.innerRef,u=e.children,c=e.fill,d=c===void 0?"transparent":c,f=UI(e,WI),g=MS({angle:n,radius:r,defined:i,curve:a});return u?_.createElement(_.Fragment,null,u({path:g})):_.createElement("path",xg({ref:l,className:$e("visx-line-radial",t),d:g(o)||"",fill:d},f))}var qI=["children","x","x0","x1","y","y0","y1","data","defined","className","curve","innerRef"];function bg(){return bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bg.apply(this,arguments)}function VI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function KI(e){var t=e.children,n=e.x,r=e.x0,i=e.x1,a=e.y,s=e.y0,o=e.y1,l=e.data,u=l===void 0?[]:l,c=e.defined,d=c===void 0?function(){return!0}:c,f=e.className,g=e.curve,p=e.innerRef,m=VI(e,qI),v=Mc({x:n,x0:r,x1:i,y:a,y0:s,y1:o,defined:d,curve:g});return t?_.createElement(_.Fragment,null,t({path:v})):_.createElement("path",bg({ref:p,className:$e("visx-area",f),d:v(u)||""},m))}var YI=["x","x0","x1","y","y1","y0","yScale","data","defined","className","curve","innerRef","children"];function _g(){return _g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_g.apply(this,arguments)}function GI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function wg(e){var t=e.x,n=e.x0,r=e.x1,i=e.y,a=e.y1,s=e.y0,o=e.yScale,l=e.data,u=l===void 0?[]:l,c=e.defined,d=c===void 0?function(){return!0}:c,f=e.className,g=e.curve,p=e.innerRef,m=e.children,v=GI(e,YI),x=Mc({x:t,x0:n,x1:r,defined:d,curve:g});return s==null?x.y0(o.range()[0]):rt(x.y0,s),i&&!a&&rt(x.y1,i),a&&!i&&rt(x.y1,a),m?_.createElement(_.Fragment,null,m({path:x})):_.createElement("path",_g({ref:p,className:$e("visx-area-closed",f),d:x(u)||""},v))}var XI=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function kg(){return kg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kg.apply(this,arguments)}function JI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function $S(e){var t=e.className,n=e.top,r=e.left,i=e.keys,a=e.data,s=e.curve,o=e.defined,l=e.x,u=e.x0,c=e.x1,d=e.y0,f=e.y1,g=e.value,p=e.order,m=e.offset,v=e.color,x=e.children,y=JI(e,XI),b=jS({keys:i,value:g,order:p,offset:m}),k=Mc({x:l,x0:u,x1:c,y0:d,y1:f,curve:s,defined:o}),w=b(a);return x?_.createElement(_.Fragment,null,x({stacks:w,path:k,stack:b})):_.createElement(ct,{top:n,left:r},w.map(function(S,N){return _.createElement("path",kg({className:$e("visx-stack",t),key:"stack-"+N+"-"+(S.key||""),d:k(S)||"",fill:v==null?void 0:v(S.key,N)},y))}))}var ZI=["className","top","left","keys","data","curve","defined","x","x0","x1","y0","y1","value","order","offset","color","children"];function jc(){return jc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jc.apply(this,arguments)}function QI(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function eF(e){var t=e.className,n=e.top,r=e.left,i=e.keys,a=e.data,s=e.curve,o=e.defined,l=e.x,u=e.x0,c=e.x1,d=e.y0,f=e.y1,g=e.value,p=e.order,m=e.offset,v=e.color,x=e.children,y=QI(e,ZI);return _.createElement($S,jc({className:t,top:n,left:r,keys:i,data:a,curve:s,defined:o,x:l,x0:u,x1:c,y0:d,y1:f,value:g,order:p,offset:m,color:v},y),x||function(b){var k=b.stacks,w=b.path;return k.map(function(S,N){return _.createElement("path",jc({className:$e("visx-area-stack",t),key:"area-stack-"+N+"-"+(S.key||""),d:w(S)||"",fill:v==null?void 0:v(S.key,N)},y))})})}var tF=["className","innerRef"];function Sg(){return Sg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sg.apply(this,arguments)}function nF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Ei(e){var t=e.className,n=e.innerRef,r=nF(e,tF);return _.createElement("rect",Sg({ref:n,className:$e("visx-bar",t)},r))}var rF=["children","className","innerRef","x","y","width","height","radius","all","top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"];function Ng(){return Ng=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ng.apply(this,arguments)}function iF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function aF(e){var t=e.all,n=e.bottom,r=e.bottomLeft,i=e.bottomRight,a=e.height,s=e.left,o=e.radius,l=e.right,u=e.top,c=e.topLeft,d=e.topRight,f=e.width,g=e.x,p=e.y;d=t||u||l||d,i=t||n||l||i,r=t||n||s||r,c=t||u||s||c,o=Math.max(1,Math.min(o,Math.min(f,a)/2));var m=2*o,v=("M"+(g+o)+","+p+" h"+(f-m)+`
318
+ `+(d?"a"+o+","+o+" 0 0 1 "+o+","+o:"h"+o+"v"+o)+`
319
+ v`+(a-m)+`
320
+ `+(i?"a"+o+","+o+" 0 0 1 "+-o+","+o:"v"+o+"h"+-o)+`
321
+ h`+(m-f)+`
322
+ `+(r?"a"+o+","+o+" 0 0 1 "+-o+","+-o:"h"+-o+"v"+-o)+`
323
+ v`+(m-a)+`
324
+ `+(c?"a"+o+","+o+" 0 0 1 "+o+","+-o:"v"+-o+"h"+o)+`
325
+ z`).split(`
326
+ `).join("");return v}function sF(e){var t=e.children,n=e.className,r=e.innerRef,i=e.x,a=e.y,s=e.width,o=e.height,l=e.radius,u=e.all,c=u===void 0?!1:u,d=e.top,f=d===void 0?!1:d,g=e.bottom,p=g===void 0?!1:g,m=e.left,v=m===void 0?!1:m,x=e.right,y=x===void 0?!1:x,b=e.topLeft,k=b===void 0?!1:b,w=e.topRight,S=w===void 0?!1:w,N=e.bottomLeft,E=N===void 0?!1:N,T=e.bottomRight,C=T===void 0?!1:T,O=iF(e,rF),$=aF({x:i,y:a,width:s,height:o,radius:l,all:c,top:f,bottom:p,left:v,right:y,topLeft:k,topRight:S,bottomLeft:E,bottomRight:C});return t?_.createElement(_.Fragment,null,t({path:$})):_.createElement("path",Ng({ref:r,className:$e("visx-bar-rounded",n),d:$},O))}function Oc(e){if("bandwidth"in e)return e.bandwidth();var t=e.range(),n=e.domain();return Math.abs(t[t.length-1]-t[0])/n.length}var oF=["data","className","top","left","x0","x0Scale","x1Scale","yScale","color","keys","height","children"];function Eg(){return Eg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Eg.apply(this,arguments)}function lF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function uF(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x0,s=e.x0Scale,o=e.x1Scale,l=e.yScale,u=e.color,c=e.keys,d=e.height,f=e.children,g=lF(e,oF),p=Oc(o),m=t.map(function(v,x){return{index:x,x0:s(a(v)),bars:c.map(function(y,b){var k=v[y];return{index:b,key:y,value:k,width:p,x:o(y)||0,y:l(k)||0,color:u(y,b),height:d-(l(k)||0)}})}});return f?_.createElement(_.Fragment,null,f(m)):_.createElement(ct,{className:$e("visx-bar-group",n),top:r,left:i},m.map(function(v){return _.createElement(ct,{key:"bar-group-"+v.index+"-"+v.x0,left:v.x0},v.bars.map(function(x){return _.createElement(Ei,Eg({key:"bar-group-bar-"+v.index+"-"+x.index+"-"+x.value+"-"+x.key,x:x.x,y:x.y,width:x.width,height:x.height,fill:x.color},g))}))}))}var cF=["data","className","top","left","x","y0","y0Scale","y1Scale","xScale","color","keys","width","children"];function Tg(){return Tg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tg.apply(this,arguments)}function dF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fF(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x,s=a===void 0?function(){return 0}:a,o=e.y0,l=e.y0Scale,u=e.y1Scale,c=e.xScale,d=e.color,f=e.keys;e.width;var g=e.children,p=dF(e,cF),m=Oc(u),v=t.map(function(x,y){return{index:y,y0:l(o(x))||0,bars:f.map(function(b,k){var w=x[b];return{index:k,key:b,value:w,height:m,x:s(w)||0,y:u(b)||0,color:d(b,k),width:c(w)||0}})}});return g?_.createElement(_.Fragment,null,g(v)):_.createElement(ct,{className:$e("visx-bar-group-horizontal",n),top:r,left:i},v.map(function(x){return _.createElement(ct,{key:"bar-group-"+x.index+"-"+x.y0,top:x.y0},x.bars.map(function(y){return _.createElement(Ei,Tg({key:"bar-group-bar-"+x.index+"-"+y.index+"-"+y.value+"-"+y.key,x:y.x,y:y.y,width:y.width,height:y.height,fill:y.color},p))}))}))}function Rn(e){return typeof(e==null?void 0:e.x)=="number"?e==null?void 0:e.x:0}function Bn(e){return typeof(e==null?void 0:e.y)=="number"?e==null?void 0:e.y:0}function Wn(e){return e==null?void 0:e.source}function Un(e){return e==null?void 0:e.target}function PS(e){return e==null?void 0:e[0]}function AS(e){return e==null?void 0:e[1]}var hF=["data","className","top","left","x","y0","y1","xScale","yScale","color","keys","value","order","offset","children"];function Cg(){return Cg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cg.apply(this,arguments)}function pF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function gF(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.x,s=e.y0,o=s===void 0?PS:s,l=e.y1,u=l===void 0?AS:l,c=e.xScale,d=e.yScale,f=e.color,g=e.keys,p=e.value,m=e.order,v=e.offset,x=e.children,y=pF(e,hF),b=Sc();g&&b.keys(g),p&&rt(b.value,p),m&&b.order(Ec(m)),v&&b.offset(Cc(v));var k=b(t),w=Oc(c),S=k.map(function(N,E){var T=N.key;return{index:E,key:T,bars:N.map(function(C,O){var $=(d(o(C))||0)-(d(u(C))||0),M=d(u(C)),j="bandwidth"in c?c(a(C.data)):Math.max((c(a(C.data))||0)-w/2);return{bar:C,key:T,index:O,height:$,width:w,x:j||0,y:M||0,color:f(N.key,O)}})}});return x?_.createElement(_.Fragment,null,x(S)):_.createElement(ct,{className:$e("visx-bar-stack",n),top:r,left:i},S.map(function(N){return N.bars.map(function(E){return _.createElement(Ei,Cg({key:"bar-stack-"+N.index+"-"+E.index,x:E.x,y:E.y,height:E.height,width:E.width,fill:E.color},y))})}))}var mF=["data","className","top","left","y","x0","x1","xScale","yScale","color","keys","value","order","offset","children"];function Mg(){return Mg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Mg.apply(this,arguments)}function vF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yF(e){var t=e.data,n=e.className,r=e.top,i=e.left,a=e.y,s=e.x0,o=s===void 0?PS:s,l=e.x1,u=l===void 0?AS:l,c=e.xScale,d=e.yScale,f=e.color,g=e.keys,p=e.value,m=e.order,v=e.offset,x=e.children,y=vF(e,mF),b=Sc();g&&b.keys(g),p&&rt(b.value,p),m&&b.order(Ec(m)),v&&b.offset(Cc(v));var k=b(t),w=Oc(d),S=k.map(function(N,E){var T=N.key;return{index:E,key:T,bars:N.map(function(C,O){var $=(c(u(C))||0)-(c(o(C))||0),M=c(o(C)),j="bandwidth"in d?d(a(C.data)):Math.max((d(a(C.data))||0)-$/2);return{bar:C,key:T,index:O,height:w,width:$,x:M||0,y:j||0,color:f(N.key,O)}})}});return x?_.createElement(_.Fragment,null,x(S)):_.createElement(ct,{className:$e("visx-bar-stack-horizontal",n),top:r,left:i},S.map(function(N){return N.bars.map(function(E){return _.createElement(Ei,Mg({key:"bar-stack-"+N.index+"-"+E.index,x:E.x,y:E.y,height:E.height,width:E.width,fill:E.color},y))})}))}var LS=function(t){return Math.PI/180*t},xF=["className","children","data","innerRef","path","x","y","source","target"];function jg(){return jg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jg.apply(this,arguments)}function bF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function DS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var s=Yk();return s.x(r),s.y(i),s.source(t),s.target(n),s(a)}}function _F(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,s=e.x,o=s===void 0?Bn:s,l=e.y,u=l===void 0?Rn:l,c=e.source,d=c===void 0?Wn:c,f=e.target,g=f===void 0?Un:f,p=bF(e,xF),m=a||DS({source:d,target:g,x:o,y:u});return n?_.createElement(_.Fragment,null,n({path:m})):_.createElement("path",jg({ref:i,className:$e("visx-link visx-link-horizontal-diagonal",t),d:m(r)||""},p))}var wF=["className","children","data","innerRef","path","x","y","source","target"];function Og(){return Og=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Og.apply(this,arguments)}function kF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function IS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var s=Gk();return s.x(r),s.y(i),s.source(t),s.target(n),s(a)}}function SF(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,s=e.x,o=s===void 0?Rn:s,l=e.y,u=l===void 0?Bn:l,c=e.source,d=c===void 0?Wn:c,f=e.target,g=f===void 0?Un:f,p=kF(e,wF),m=a||IS({source:d,target:g,x:o,y:u});return n?_.createElement(_.Fragment,null,n({path:m})):_.createElement("path",Og({ref:i,className:$e("visx-link visx-link-vertical-diagonal",t),d:m(r)||""},p))}var NF=["className","children","data","innerRef","path","angle","radius","source","target"];function $g(){return $g=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$g.apply(this,arguments)}function EF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function FS(e){var t=e.source,n=e.target,r=e.angle,i=e.radius;return function(a){var s=Xk();return s.angle(r),s.radius(i),s.source(t),s.target(n),s(a)}}function TF(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,s=e.angle,o=s===void 0?Rn:s,l=e.radius,u=l===void 0?Bn:l,c=e.source,d=c===void 0?Wn:c,f=e.target,g=f===void 0?Un:f,p=EF(e,NF),m=a||FS({source:d,target:g,angle:o,radius:u});return n?_.createElement(_.Fragment,null,n({path:m})):_.createElement("path",$g({ref:i,className:$e("visx-link visx-link-radial-diagonal",t),d:m(r)||""},p))}var CF=["className","children","data","innerRef","path","percent","x","y","source","target"];function Pg(){return Pg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Pg.apply(this,arguments)}function MF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function zS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(s){var o=t(s),l=n(s),u=r(o),c=i(o),d=r(l),f=i(l),g=d-u,p=f-c,m=a*(g+p),v=a*(p-g),x=hn();return x.moveTo(u,c),x.bezierCurveTo(u+m,c+v,d+v,f-m,d,f),x.toString()}}function jF(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,s=e.percent,o=s===void 0?.2:s,l=e.x,u=l===void 0?Bn:l,c=e.y,d=c===void 0?Rn:c,f=e.source,g=f===void 0?Wn:f,p=e.target,m=p===void 0?Un:p,v=MF(e,CF),x=a||zS({source:g,target:m,x:u,y:d,percent:o});return n?_.createElement(_.Fragment,null,n({path:x})):_.createElement("path",Pg({ref:i,className:$e("visx-link visx-link-horizontal-curve",t),d:x(r)||""},v))}var OF=["className","children","data","innerRef","path","percent","x","y","source","target"];function Ag(){return Ag=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ag.apply(this,arguments)}function $F(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function RS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(s){var o=t(s),l=n(s),u=r(o),c=i(o),d=r(l),f=i(l),g=d-u,p=f-c,m=a*(g+p),v=a*(p-g),x=hn();return x.moveTo(u,c),x.bezierCurveTo(u+m,c+v,d+v,f-m,d,f),x.toString()}}function PF(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,s=e.percent,o=s===void 0?.2:s,l=e.x,u=l===void 0?Rn:l,c=e.y,d=c===void 0?Bn:c,f=e.source,g=f===void 0?Wn:f,p=e.target,m=p===void 0?Un:p,v=$F(e,OF),x=a||RS({source:g,target:m,x:u,y:d,percent:o});return n?_.createElement(_.Fragment,null,n({path:x})):_.createElement("path",Ag({ref:i,className:$e("visx-link visx-link-vertical-curve",t),d:x(r)||""},v))}var AF=["className","children","data","innerRef","path","percent","x","y","source","target"];function Lg(){return Lg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lg.apply(this,arguments)}function LF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function BS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(s){var o=t(s),l=n(s),u=r(o)-Math.PI/2,c=i(o),d=r(l)-Math.PI/2,f=i(l),g=Math.cos(u),p=Math.sin(u),m=Math.cos(d),v=Math.sin(d),x=c*g,y=c*p,b=f*m,k=f*v,w=b-x,S=k-y,N=a*(w+S),E=a*(S-w),T=hn();return T.moveTo(x,y),T.bezierCurveTo(x+N,y+E,b+E,k-N,b,k),T.toString()}}function DF(e){var t=e.className,n=e.children,r=e.data,i=e.innerRef,a=e.path,s=e.percent,o=s===void 0?.2:s,l=e.x,u=l===void 0?Rn:l,c=e.y,d=c===void 0?Bn:c,f=e.source,g=f===void 0?Wn:f,p=e.target,m=p===void 0?Un:p,v=LF(e,AF),x=a||BS({source:g,target:m,x:u,y:d,percent:o});return n?_.createElement(_.Fragment,null,n({path:x})):_.createElement("path",Lg({ref:i,className:$e("visx-link visx-link-radial-curve",t),d:x(r)||""},v))}var IF=["className","children","innerRef","data","path","x","y","source","target"];function Dg(){return Dg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dg.apply(this,arguments)}function FF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function WS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var s=t(a),o=n(a),l=r(s),u=i(s),c=r(o),d=i(o),f=hn();return f.moveTo(l,u),f.lineTo(c,d),f.toString()}}function zF(e){var t=e.className,n=e.children,r=e.innerRef,i=e.data,a=e.path,s=e.x,o=s===void 0?Bn:s,l=e.y,u=l===void 0?Rn:l,c=e.source,d=c===void 0?Wn:c,f=e.target,g=f===void 0?Un:f,p=FF(e,IF),m=a||WS({source:d,target:g,x:o,y:u});return n?_.createElement(_.Fragment,null,n({path:m})):_.createElement("path",Dg({ref:r,className:$e("visx-link visx-link-horizontal-line",t),d:m(i)||""},p))}var RF=["className","innerRef","data","path","x","y","source","target","children"];function Ig(){return Ig=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ig.apply(this,arguments)}function BF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function US(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var s=t(a),o=n(a),l=r(s),u=i(s),c=r(o),d=i(o),f=hn();return f.moveTo(l,u),f.lineTo(c,d),f.toString()}}function WF(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,s=a===void 0?Rn:a,o=e.y,l=o===void 0?Bn:o,u=e.source,c=u===void 0?Wn:u,d=e.target,f=d===void 0?Un:d,g=e.children,p=BF(e,RF),m=i||US({source:c,target:f,x:s,y:l});return g?_.createElement(_.Fragment,null,g({path:m})):_.createElement("path",Ig({ref:n,className:$e("visx-link visx-link-vertical-line",t),d:m(r)||""},p))}var UF=["className","innerRef","data","path","x","y","source","target","children"];function Fg(){return Fg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Fg.apply(this,arguments)}function HF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function HS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var s=t(a),o=n(a),l=r(s)-Math.PI/2,u=i(s),c=r(o)-Math.PI/2,d=i(o),f=Math.cos(l),g=Math.sin(l),p=Math.cos(c),m=Math.sin(c),v=hn();return v.moveTo(u*f,u*g),v.lineTo(d*p,d*m),v.toString()}}function qF(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,s=a===void 0?Rn:a,o=e.y,l=o===void 0?Bn:o,u=e.source,c=u===void 0?Wn:u,d=e.target,f=d===void 0?Un:d,g=e.children,p=HF(e,UF),m=i||HS({source:c,target:f,x:s,y:l});return g?_.createElement(_.Fragment,null,g({path:m})):_.createElement("path",Fg({ref:n,className:$e("visx-link visx-link-radial-line",t),d:m(r)||""},p))}var VF=["className","innerRef","data","path","percent","x","y","source","target","children"];function zg(){return zg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zg.apply(this,arguments)}function KF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function qS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(s){var o=t(s),l=n(s),u=r(o),c=i(o),d=r(l),f=i(l),g=hn();return g.moveTo(u,c),g.lineTo(u+(d-u)*a,c),g.lineTo(u+(d-u)*a,f),g.lineTo(d,f),g.toString()}}function YF(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.percent,s=a===void 0?.5:a,o=e.x,l=o===void 0?Bn:o,u=e.y,c=u===void 0?Rn:u,d=e.source,f=d===void 0?Wn:d,g=e.target,p=g===void 0?Un:g,m=e.children,v=KF(e,VF),x=i||qS({source:f,target:p,x:l,y:c,percent:s});return m?_.createElement(_.Fragment,null,m({path:x})):_.createElement("path",zg({ref:n,className:$e("visx-link visx-link-horizontal-step",t),d:x(r)||""},v))}var GF=["className","innerRef","data","path","percent","x","y","source","target","children"];function Rg(){return Rg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rg.apply(this,arguments)}function XF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function VS(e){var t=e.source,n=e.target,r=e.x,i=e.y,a=e.percent;return function(s){var o=t(s),l=n(s),u=r(o),c=i(o),d=r(l),f=i(l),g=hn();return g.moveTo(u,c),g.lineTo(u,c+(f-c)*a),g.lineTo(d,c+(f-c)*a),g.lineTo(d,f),g.toString()}}function JF(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.percent,s=a===void 0?.5:a,o=e.x,l=o===void 0?Rn:o,u=e.y,c=u===void 0?Bn:u,d=e.source,f=d===void 0?Wn:d,g=e.target,p=g===void 0?Un:g,m=e.children,v=XF(e,GF),x=i||VS({source:f,target:p,x:l,y:c,percent:s});return m?_.createElement(_.Fragment,null,m({path:x})):_.createElement("path",Rg({ref:n,className:$e("visx-link visx-link-vertical-step",t),d:x(r)||""},v))}var ZF=["className","innerRef","data","path","x","y","source","target","children"];function Bg(){return Bg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bg.apply(this,arguments)}function QF(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function KS(e){var t=e.source,n=e.target,r=e.x,i=e.y;return function(a){var s=t(a),o=n(a),l=r(s),u=i(s),c=r(o),d=i(o),f=l-Math.PI/2,g=u,p=c-Math.PI/2,m=d,v=Math.cos(f),x=Math.sin(f),y=Math.cos(p),b=Math.sin(p),k=Math.abs(p-f)>Math.PI?p<=f:p>f;return`
327
+ M`+g*v+","+g*x+`
328
+ A`+g+","+g+",0,0,"+(k?1:0)+","+g*y+","+g*b+`
329
+ L`+m*y+","+m*b+`
330
+ `}}function e3(e){var t=e.className,n=e.innerRef,r=e.data,i=e.path,a=e.x,s=a===void 0?Rn:a,o=e.y,l=o===void 0?Bn:o,u=e.source,c=u===void 0?Wn:u,d=e.target,f=d===void 0?Un:d,g=e.children,p=QF(e,ZF),m=i||KS({source:c,target:f,x:s,y:l});return g?_.createElement(_.Fragment,null,g({path:m})):_.createElement("path",Bg({ref:n,className:$e("visx-link visx-link-radial-step",t),d:m(r)||""},p))}var t3=["sides","size","center","rotate","className","children","innerRef","points"];function Wg(){return Wg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wg.apply(this,arguments)}function n3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var YS={x:0,y:0},GS=function(t){var n=t.sides,r=n===void 0?4:n,i=t.size,a=i===void 0?25:i,s=t.center,o=s===void 0?YS:s,l=t.rotate,u=l===void 0?0:l,c=t.side,d=360/r*c-u,f=LS(d);return{x:o.x+a*Math.cos(f),y:o.y+a*Math.sin(f)}},XS=function(t){var n=t.sides,r=t.size,i=t.center,a=t.rotate;return new Array(n).fill(0).map(function(s,o){return GS({sides:n,size:r,center:i,rotate:a,side:o})})};function r3(e){var t=e.sides,n=t===void 0?4:t,r=e.size,i=r===void 0?25:r,a=e.center,s=a===void 0?YS:a,o=e.rotate,l=o===void 0?0:o,u=e.className,c=e.children,d=e.innerRef,f=e.points,g=n3(e,t3),p=f||XS({sides:n,size:i,center:s,rotate:l}).map(function(m){var v=m.x,x=m.y;return[v,x]});return c?_.createElement(_.Fragment,null,c({points:p})):_.createElement("polygon",Wg({ref:d,className:$e("visx-polygon",u),points:p.join(" ")},g))}var i3=["className","innerRef"];function Ug(){return Ug=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ug.apply(this,arguments)}function a3(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function s3(e){var t=e.className,n=e.innerRef,r=a3(e,i3);return _.createElement("circle",Ug({ref:n,className:$e("visx-circle",t)},r))}var JS="http://www.w3.org/2000/svg";function o3(e){var t=document.getElementById(e);if(!t){var n=document.createElementNS(JS,"svg");n.setAttribute("aria-hidden","true"),n.style.opacity="0",n.style.width="0",n.style.height="0",n.style.position="absolute",n.style.top="-100%",n.style.left="-100%",n.style.pointerEvents="none",t=document.createElementNS(JS,"path"),t.setAttribute("id",e),n.appendChild(t),document.body.appendChild(n)}return t}var l3="__visx_splitpath_svg_path_measurement_id",ZS=function(){return!0};function u3(e){var t=e.path,n=e.pointsInSegments,r=e.segmentation,i=r===void 0?"x":r,a=e.sampleRate,s=a===void 0?1:a;try{var o=o3(l3);o.setAttribute("d",t);var l=o.getTotalLength(),u=n.length,c=n.map(function(){return[]});if(i==="x"||i==="y")for(var d=n.map(function(M){var j;return(j=M.find(function(P){return typeof P[i]=="number"}))==null?void 0:j[i]}),f=o.getPointAtLength(0),g=o.getPointAtLength(l),p=g[i]>f[i],m=p?d.map(function(M){return typeof M>"u"?ZS:function(j){return j>=M}}):d.map(function(M){return typeof M>"u"?ZS:function(j){return j<=M}}),v=0,x=0;x<=l;x+=s){for(var y=o.getPointAtLength(x),b=y[i];v<u-1&&m[v+1](b);)v+=1;c[v].push(y)}else{var k=n.map(function(M){return M.length}),w=k.reduce(function(M,j){return M+j},0),S=l/Math.max(1,w-1),N=k.slice(0,u-1);N.unshift(0);for(var E=2;E<u;E+=1)N[E]+=N[E-1];for(var T=0;T<u;T+=1)N[T]*=S;for(var C=0,O=0;O<=l;O+=s){for(var $=o.getPointAtLength(O);C<u-1&&O>=N[C+1];)C+=1;c[C].push($)}}return c}catch{return[]}}function Hg(){return Hg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hg.apply(this,arguments)}var c3=function(t){return t.x||0},d3=function(t){return t.y||0};function QS(e){var t=e.children,n=e.className,r=e.curve,i=e.defined,a=e.segmentation,s=e.sampleRate,o=e.segments,l=e.x,u=e.y,c=e.styles,d=_.useMemo(function(){var p=typeof l=="number"||typeof l>"u"?function(){return l}:l,m=typeof u=="number"||typeof u>"u"?function(){return u}:u;return o.map(function(v){return v.map(function(x,y){return{x:p(x,y,v),y:m(x,y,v)}})})},[l,u,o]),f=_.useMemo(function(){var p=hg({x:l,y:u,defined:i,curve:r});return p(o.flat())||""},[l,u,i,r,o]),g=_.useMemo(function(){return u3({path:f,segmentation:a,pointsInSegments:d,sampleRate:s})},[f,a,d,s]);return _.createElement("g",null,g.map(function(p,m){return t?_.createElement(_.Fragment,{key:m},t({index:m,segment:p,styles:c[m]||c[m%c.length]})):_.createElement(Ss,Hg({key:m,className:n,data:p,x:c3,y:d3},c[m]||c[m%c.length]))}))}QS.propTypes={segments:V.arrayOf(V.array).isRequired,styles:V.array.isRequired,children:V.func,className:V.string};const f3=Object.freeze(Object.defineProperty({__proto__:null,Arc:LI,Area:KI,AreaClosed:wg,AreaStack:eF,Bar:Ei,BarGroup:uF,BarGroupHorizontal:fF,BarRounded:sF,BarStack:gF,BarStackHorizontal:yF,Circle:s3,Line:vg,LinePath:Ss,LineRadial:HI,LinkHorizontal:_F,LinkHorizontalCurve:jF,LinkHorizontalLine:zF,LinkHorizontalStep:YF,LinkRadial:TF,LinkRadialCurve:DF,LinkRadialLine:qF,LinkRadialStep:e3,LinkVertical:SF,LinkVerticalCurve:PF,LinkVerticalLine:WF,LinkVerticalStep:JF,Pie:OS,Polygon:r3,STACK_OFFSETS:Tc,STACK_OFFSET_NAMES:$I,STACK_ORDERS:Nc,STACK_ORDER_NAMES:OI,SplitLinePath:QS,Stack:$S,arc:fg,area:Mc,degreesToRadians:LS,getPoint:GS,getPoints:XS,line:hg,pathHorizontalCurve:zS,pathHorizontalDiagonal:DS,pathHorizontalLine:WS,pathHorizontalStep:qS,pathRadialCurve:BS,pathRadialDiagonal:FS,pathRadialLine:HS,pathRadialStep:KS,pathVerticalCurve:RS,pathVerticalDiagonal:IS,pathVerticalLine:US,pathVerticalStep:VS,pie:CS,radialLine:MS,stack:jS,stackOffset:Cc,stackOrder:Ec},Symbol.toStringTag,{value:"Module"}));var h3=eN;function eN(e,t,n){e instanceof RegExp&&(e=tN(e,n)),t instanceof RegExp&&(t=tN(t,n));var r=nN(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function tN(e,t){var n=t.match(e);return n?n[0]:null}eN.range=nN;function nN(e,t,n){var r,i,a,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){for(r=[],a=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(i=r.pop(),i<a&&(a=i,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[a,s])}return o}var p3=rN;function rN(e,t,n){e instanceof RegExp&&(e=iN(e,n)),t instanceof RegExp&&(t=iN(t,n));var r=aN(e,t,n);return r&&{start:r[0],end:r[1],pre:n.slice(0,r[0]),body:n.slice(r[0]+e.length,r[1]),post:n.slice(r[1]+t.length)}}function iN(e,t){var n=t.match(e);return n?n[0]:null}rN.range=aN;function aN(e,t,n){var r,i,a,s,o,l=n.indexOf(e),u=n.indexOf(t,l+1),c=l;if(l>=0&&u>0){if(e===t)return[l,u];for(r=[],a=n.length;c>=0&&!o;)c==l?(r.push(c),l=n.indexOf(e,c+1)):r.length==1?o=[r.pop(),u]:(i=r.pop(),i<a&&(a=i,s=u),u=n.indexOf(t,c+1)),c=l<u&&l>=0?l:u;r.length&&(o=[a,s])}return o}var g3=p3,m3=sN;function sN(e,t,n){var r=e;return v3(e,t).reduce(function(i,a){return i.replace(a.functionIdentifier+"("+a.matches.body+")",y3(a.matches.body,a.functionIdentifier,n,r,t))},e)}function v3(e,t){var n=[],r=typeof t=="string"?new RegExp("\\b("+t+")\\("):t;do{var i=r.exec(e);if(!i)return n;if(i[1]===void 0)throw new Error("Missing the first couple of parenthesis to get the function identifier in "+t);var a=i[1],s=i.index,o=g3("(",")",e.substring(s));if(!o||o.start!==i[0].length-1)throw new SyntaxError(a+"(): missing closing ')' in the value '"+e+"'");n.push({matches:o,functionIdentifier:a}),e=o.post}while(r.test(e));return n}function y3(e,t,n,r,i){return n(sN(e,i,n),t,r)}var tn=function(e){this.value=e};tn.math={isDegree:!0,acos:function(e){return tn.math.isDegree?180/Math.PI*Math.acos(e):Math.acos(e)},add:function(e,t){return e+t},asin:function(e){return tn.math.isDegree?180/Math.PI*Math.asin(e):Math.asin(e)},atan:function(e){return tn.math.isDegree?180/Math.PI*Math.atan(e):Math.atan(e)},acosh:function(e){return Math.log(e+Math.sqrt(e*e-1))},asinh:function(e){return Math.log(e+Math.sqrt(e*e+1))},atanh:function(e){return Math.log((1+e)/(1-e))},C:function(e,t){var n=1,r=e-t,i=t;i<r&&(i=r,r=t);for(var a=i+1;a<=e;a++)n*=a;return n/tn.math.fact(r)},changeSign:function(e){return-e},cos:function(e){return tn.math.isDegree&&(e=tn.math.toRadian(e)),Math.cos(e)},cosh:function(e){return(Math.pow(Math.E,e)+Math.pow(Math.E,-1*e))/2},div:function(e,t){return e/t},fact:function(e){if(e%1!==0)return"NaN";for(var t=1,n=2;n<=e;n++)t*=n;return t},inverse:function(e){return 1/e},log:function(e){return Math.log(e)/Math.log(10)},mod:function(e,t){return e%t},mul:function(e,t){return e*t},P:function(e,t){for(var n=1,r=Math.floor(e)-Math.floor(t)+1;r<=Math.floor(e);r++)n*=r;return n},Pi:function(e,t,n){for(var r=1,i=e;i<=t;i++)r*=Number(n.postfixEval({n:i}));return r},pow10x:function(e){for(var t=1;e--;)t*=10;return t},sigma:function(e,t,n){for(var r=0,i=e;i<=t;i++)r+=Number(n.postfixEval({n:i}));return r},sin:function(e){return tn.math.isDegree&&(e=tn.math.toRadian(e)),Math.sin(e)},sinh:function(e){return(Math.pow(Math.E,e)-Math.pow(Math.E,-1*e))/2},sub:function(e,t){return e-t},tan:function(e){return tn.math.isDegree&&(e=tn.math.toRadian(e)),Math.tan(e)},tanh:function(e){return tn.sinha(e)/tn.cosha(e)},toRadian:function(e){return e*Math.PI/180},and:function(e,t){return e&t}},tn.Exception=function(e){this.message=e};var x3=tn,Te=x3;function nn(e,t){for(var n=0;n<e.length;n++)e[n]+=t;return e}for(var Ti=[{token:"sin",show:"sin",type:0,value:Te.math.sin},{token:"cos",show:"cos",type:0,value:Te.math.cos},{token:"tan",show:"tan",type:0,value:Te.math.tan},{token:"pi",show:"&pi;",type:3,value:"PI"},{token:"(",show:"(",type:4,value:"("},{token:")",show:")",type:5,value:")"},{token:"P",show:"P",type:10,value:Te.math.P},{token:"C",show:"C",type:10,value:Te.math.C},{token:" ",show:" ",type:14,value:" ".anchor},{token:"asin",show:"asin",type:0,value:Te.math.asin},{token:"acos",show:"acos",type:0,value:Te.math.acos},{token:"atan",show:"atan",type:0,value:Te.math.atan},{token:"7",show:"7",type:1,value:"7"},{token:"8",show:"8",type:1,value:"8"},{token:"9",show:"9",type:1,value:"9"},{token:"int",show:"Int",type:0,value:Math.floor},{token:"cosh",show:"cosh",type:0,value:Te.math.cosh},{token:"acosh",show:"acosh",type:0,value:Te.math.acosh},{token:"ln",show:" ln",type:0,value:Math.log},{token:"^",show:"^",type:10,value:Math.pow},{token:"root",show:"root",type:0,value:Math.sqrt},{token:"4",show:"4",type:1,value:"4"},{token:"5",show:"5",type:1,value:"5"},{token:"6",show:"6",type:1,value:"6"},{token:"/",show:"&divide;",type:2,value:Te.math.div},{token:"!",show:"!",type:7,value:Te.math.fact},{token:"tanh",show:"tanh",type:0,value:Te.math.tanh},{token:"atanh",show:"atanh",type:0,value:Te.math.atanh},{token:"Mod",show:" Mod ",type:2,value:Te.math.mod},{token:"1",show:"1",type:1,value:"1"},{token:"2",show:"2",type:1,value:"2"},{token:"3",show:"3",type:1,value:"3"},{token:"*",show:"&times;",type:2,value:Te.math.mul},{token:"sinh",show:"sinh",type:0,value:Te.math.sinh},{token:"asinh",show:"asinh",type:0,value:Te.math.asinh},{token:"e",show:"e",type:3,value:"E"},{token:"log",show:" log",type:0,value:Te.math.log},{token:"0",show:"0",type:1,value:"0"},{token:".",show:".",type:6,value:"."},{token:"+",show:"+",type:9,value:Te.math.add},{token:"-",show:"-",type:9,value:Te.math.sub},{token:",",show:",",type:11,value:","},{token:"Sigma",show:"&Sigma;",type:12,value:Te.math.sigma},{token:"n",show:"n",type:13,value:"n"},{token:"Pi",show:"&Pi;",type:12,value:Te.math.Pi},{token:"pow",show:"pow",type:8,value:Math.pow,numberOfArguments:2},{token:"&",show:"&",type:9,value:Te.math.and}],qg={0:11,1:0,2:3,3:0,4:0,5:0,6:0,7:11,8:11,9:1,10:10,11:0,12:11,13:0,14:-1,15:11},$c=0;$c<Ti.length;$c++)Ti[$c].precedence=qg[Ti[$c].type];var Mr={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,9:!0,12:!0,13:!0,14:!0,15:!0},Ns={0:!0,1:!0,2:!0,3:!0,4:!0,5:!0,6:!0,7:!0,8:!0,9:!0,10:!0,11:!0,12:!0,13:!0,15:!0},b3={0:!0,3:!0,4:!0,8:!0,12:!0,13:!0,15:!0},ur={},tl={0:!0,1:!0,3:!0,4:!0,6:!0,8:!0,12:!0,13:!0,15:!0},_3={1:!0},rn=[[],["1","2","3","7","8","9","4","5","6","+","-","*","/","(",")","^","!","P","C","e","0",".",",","n"," ","&"],["pi","ln","Pi"],["sin","cos","tan","Del","int","Mod","log","pow"],["asin","acos","atan","cosh","root","tanh","sinh"],["acosh","atanh","asinh","Sigma"]];function w3(e,t,n,r){for(var i=0;i<r;i++)if(e[n+i]!==t[i])return!1;return!0}Te.tokenTypes={FUNCTION_WITH_ONE_ARG:0,NUMBER:1,BINARY_OPERATOR_HIGH_PRECENDENCE:2,CONSTANT:3,OPENING_PARENTHESIS:4,CLOSING_PARENTHESIS:5,DECIMAL:6,POSTFIX_FUNCTION_WITH_ONE_ARG:7,FUNCTION_WITH_N_ARGS:8,BINARY_OPERATOR_LOW_PRECENDENCE:9,BINARY_OPERATOR_PERMUTATION:10,COMMA:11,EVALUATED_FUNCTION:12,EVALUATED_FUNCTION_PARAMETER:13,SPACE:14},Te.addToken=function(e){for(var t=0;t<e.length;t++){var n=e[t].token.length,r=-1;e[t].type===Te.tokenTypes.FUNCTION_WITH_N_ARGS&&e[t].numberOfArguments===void 0&&(e[t].numberOfArguments=2),rn[n]=rn[n]||[];for(var i=0;i<rn[n].length;i++)if(e[t].token===rn[n][i]){r=oN(rn[n][i],Ti);break}r===-1?(Ti.push(e[t]),e[t].precedence=qg[e[t].type],rn.length<=e[t].token.length&&(rn[e[t].token.length]=[]),rn[e[t].token.length].push(e[t].token)):(Ti[r]=e[t],e[t].precedence=qg[e[t].type])}};function oN(e,t){for(var n=0;n<t.length;n++)if(t[n].token===e)return n;return-1}function k3(e){for(var t=[],n=e.length,r,i,a,s=0;s<n;s++)if(!(s<n-1&&e[s]===" "&&e[s+1]===" ")){for(r="",i=e.length-s>rn.length-2?rn.length-1:e.length-s;i>0;i--)if(rn[i]!==void 0)for(a=0;a<rn[i].length;a++)w3(e,rn[i][a],s,i)&&(r=rn[i][a],a=rn[i].length,i=0);if(s+=r.length-1,r==="")throw new Te.Exception("Can't understand after "+e.slice(s));t.push(Ti[oN(r,Ti)])}return t}var S3={value:Te.math.changeSign,type:0,pre:21,show:"-"},Pc={value:")",show:")",type:5,pre:0},nl={value:"(",type:4,pre:0,show:"("};Te.lex=function(e,t){var n=[nl],r=[],i=e,a=Mr,s=0,o=ur,l="",u;typeof t<"u"&&Te.addToken(t);var c={},d=k3(i);for(u=0;u<d.length;u++){var f=d[u];if(f.type===14){if(u>0&&u<d.length-1&&d[u+1].type===1&&(d[u-1].type===1||d[u-1].type===6))throw new Te.Exception("Unexpected Space");continue}var g=f.token,p=f.type,m=f.value,v=f.precedence,x=f.show,y=n[n.length-1],b;for(b=r.length;b--&&r[b]===0;)if([0,2,3,4,5,9,11,12,13].indexOf(p)!==-1){if(a[p]!==!0)throw new Te.Exception(g+" is not allowed after "+l);n.push(Pc),a=Ns,o=tl,r.pop()}if(a[p]!==!0)throw new Te.Exception(g+" is not allowed after "+l);if(o[p]===!0&&(p=2,m=Te.math.mul,x="&times;",v=3,u=u-1),c={value:m,type:p,pre:v,show:x,numberOfArguments:f.numberOfArguments},p===0)a=Mr,o=ur,nn(r,2),n.push(c),d[u+1].type!==4&&(n.push(nl),r.push(2));else if(p===1)y.type===1?(y.value+=m,nn(r,1)):n.push(c),a=Ns,o=b3;else if(p===2)a=Mr,o=ur,nn(r,2),n.push(c);else if(p===3)n.push(c),a=Ns,o=tl;else if(p===4)nn(r,1),s++,a=Mr,o=ur,n.push(c);else if(p===5){if(!s)throw new Te.Exception("Closing parenthesis are more than opening one, wait What!!!");s--,a=Ns,o=tl,n.push(c),nn(r,1)}else if(p===6){if(y.hasDec)throw new Te.Exception("Two decimals are not allowed in one number");y.type!==1&&(y={value:0,type:1,pre:0},n.push(y)),a=_3,nn(r,1),o=ur,y.value+=m,y.hasDec=!0}else p===7&&(a=Ns,o=tl,nn(r,1),n.push(c));p===8?(a=Mr,o=ur,nn(r,f.numberOfArguments+2),n.push(c),d[u+1].type!==4&&(n.push(nl),r.push(f.numberOfArguments+2))):p===9?(y.type===9?y.value===Te.math.add?(y.value=m,y.show=x,nn(r,1)):y.value===Te.math.sub&&x==="-"&&(y.value=Te.math.add,y.show="+",nn(r,1)):y.type!==5&&y.type!==7&&y.type!==1&&y.type!==3&&y.type!==13?g==="-"&&(a=Mr,o=ur,nn(r,2).push(2),n.push(S3),n.push(nl)):(n.push(c),nn(r,2)),a=Mr,o=ur):p===10?(a=Mr,o=ur,nn(r,2),n.push(c)):p===11?(a=Mr,o=ur,n.push(c)):p===12?(a=Mr,o=ur,nn(r,6),n.push(c),d[u+1].type!==4&&(n.push(nl),r.push(6))):p===13&&(a=Ns,o=tl,n.push(c)),nn(r,-1),l=g}for(b=r.length;b--;)n.push(Pc);if(a[5]!==!0)throw new Te.Exception("complete the expression");for(;s--;)n.push(Pc);return n.push(Pc),new Te(n)};var N3=Te,Vg=N3;Vg.prototype.toPostfix=function(){for(var e=[],t,n,r,i,a,s=[{value:"(",type:4,pre:0}],o=this.value,l=1;l<o.length;l++)if(o[l].type===1||o[l].type===3||o[l].type===13)o[l].type===1&&(o[l].value=Number(o[l].value)),e.push(o[l]);else if(o[l].type===4)s.push(o[l]);else if(o[l].type===5)for(;(n=s.pop()).type!==4;)e.push(n);else if(o[l].type===11){for(;(n=s.pop()).type!==4;)e.push(n);s.push(n)}else{t=o[l],i=t.pre,a=s[s.length-1],r=a.pre;var u=a.value=="Math.pow"&&t.value=="Math.pow";if(i>r)s.push(t);else{for(;r>=i&&!u||u&&i<r;)n=s.pop(),a=s[s.length-1],e.push(n),r=a.pre,u=t.value=="Math.pow"&&a.value=="Math.pow";s.push(t)}}return new Vg(e)};var E3=Vg,rl=E3;rl.prototype.postfixEval=function(e){e=e||{},e.PI=Math.PI,e.E=Math.E;for(var t=[],n,r,i,a=this.value,s=typeof e.n<"u",o=0;o<a.length;o++)if(a[o].type===1)t.push({value:a[o].value,type:1});else if(a[o].type===3)t.push({value:e[a[o].value],type:1});else if(a[o].type===0)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(a[o]):t[t.length-1].value=a[o].value(t[t.length-1].value);else if(a[o].type===7)typeof t[t.length-1].type>"u"?t[t.length-1].value.push(a[o]):t[t.length-1].value=a[o].value(t[t.length-1].value);else if(a[o].type===8){for(var l=[],u=0;u<a[o].numberOfArguments;u++)l.push(t.pop().value);t.push({type:1,value:a[o].value.apply(a[o],l.reverse())})}else a[o].type===10?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r.value=r.concat(n),r.value.push(a[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(a[o]),t.push(n)):t.push({type:1,value:a[o].value(r.value,n.value)})):a[o].type===2||a[o].type===9?(n=t.pop(),r=t.pop(),typeof r.type>"u"?(r=r.concat(n),r.push(a[o]),t.push(r)):typeof n.type>"u"?(n.unshift(r),n.push(a[o]),t.push(n)):t.push({type:1,value:a[o].value(r.value,n.value)})):a[o].type===12?(n=t.pop(),typeof n.type<"u"&&(n=[n]),r=t.pop(),i=t.pop(),t.push({type:1,value:a[o].value(i.value,r.value,new rl(n))})):a[o].type===13&&(s?t.push({value:e[a[o].value],type:3}):t.push([a[o]]));if(t.length>1)throw new rl.Exception("Uncaught Syntax error");return t[0].value>1e15?"Infinity":parseFloat(t[0].value.toFixed(15))},rl.eval=function(e,t,n){return typeof t>"u"?this.lex(e).toPostfix().postfixEval():typeof n>"u"?typeof t.length<"u"?this.lex(e,t).toPostfix().postfixEval():this.lex(e).toPostfix().postfixEval(t):this.lex(e,t).toPostfix().postfixEval(n)};var T3=rl,lN=T3;lN.prototype.formulaEval=function(){for(var e,t,n,r=[],i=this.value,a=0;a<i.length;a++)i[a].type===1||i[a].type===3?r.push({value:i[a].type===3?i[a].show:i[a].value,type:1}):i[a].type===13?r.push({value:i[a].show,type:1}):i[a].type===0?r[r.length-1]={value:i[a].show+(i[a].show!="-"?"(":"")+r[r.length-1].value+(i[a].show!="-"?")":""),type:0}:i[a].type===7?r[r.length-1]={value:(r[r.length-1].type!=1?"(":"")+r[r.length-1].value+(r[r.length-1].type!=1?")":"")+i[a].show,type:7}:i[a].type===10?(e=r.pop(),t=r.pop(),i[a].show==="P"||i[a].show==="C"?r.push({value:"<sup>"+t.value+"</sup>"+i[a].show+"<sub>"+e.value+"</sub>",type:10}):r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+"<sup>"+e.value+"</sup>",type:1})):i[a].type===2||i[a].type===9?(e=r.pop(),t=r.pop(),r.push({value:(t.type!=1?"(":"")+t.value+(t.type!=1?")":"")+i[a].show+(e.type!=1?"(":"")+e.value+(e.type!=1?")":""),type:i[a].type})):i[a].type===12&&(e=r.pop(),t=r.pop(),n=r.pop(),r.push({value:i[a].show+"("+n.value+","+t.value+","+e.value+")",type:12}));return r[0].value};var C3=lN,M3=h3,j3=m3,O3=C3,$3=100,P3=/(\+|\-|\*|\\|[^a-z]|)(\s*)(\()/g,Kg,A3=L3;function L3(e,t){Kg=0,t=Math.pow(10,t===void 0?5:t),e=e.replace(/\n+/g," ");function n(i,a,s){if(Kg++>$3)throw Kg=0,new Error("Call stack overflow for "+s);if(i==="")throw new Error(a+"(): '"+s+"' must contain a non-whitespace string");i=r(i,s);var o=D3(i);if(o.length>1||i.indexOf("var(")>-1)return a+"("+i+")";var l=o[0]||"";l==="%"&&(i=i.replace(/\b[0-9\.]+%/g,function(d){return parseFloat(d.slice(0,-1))*.01}));var u=i.replace(new RegExp(l,"gi"),""),c;try{c=O3.eval(u)}catch{return a+"("+i+")"}return l==="%"&&(c*=100),(a.length||l==="%")&&(c=Math.round(c*t)/t),c+=l,c}function r(i,a){i=i.replace(/((?:\-[a-z]+\-)?calc)/g,"");for(var s="",o=i,l;l=P3.exec(o);){l[0].index>0&&(s+=o.substring(0,l[0].index));var u=M3("(",")",o.substring([0].index));if(u.body==="")throw new Error("'"+i+"' must contain a non-whitespace string");var c=n(u.body,"",a);s+=u.pre+c,o=u.post}return s+o}return j3(e,/((?:\-[a-z]+\-)?calc)\(/,n)}function D3(e){for(var t=[],n=[],r=/[\.0-9]([%a-z]+)/gi,i=r.exec(e);i;)!i||!i[1]||(n.indexOf(i[1].toLowerCase())===-1&&(t.push(i[1]),n.push(i[1].toLowerCase())),i=r.exec(e));return t}const Yg=qs(A3);var I3=typeof Pa=="object"&&Pa&&Pa.Object===Object&&Pa,F3=I3,z3=F3,R3=typeof self=="object"&&self&&self.Object===Object&&self,B3=z3||R3||Function("return this")(),Ac=B3,W3=Ac,U3=W3.Symbol,uN=U3,cN=uN,dN=Object.prototype,H3=dN.hasOwnProperty,q3=dN.toString,il=cN?cN.toStringTag:void 0;function V3(e){var t=H3.call(e,il),n=e[il];try{e[il]=void 0;var r=!0}catch{}var i=q3.call(e);return r&&(t?e[il]=n:delete e[il]),i}var K3=V3,Y3=Object.prototype,G3=Y3.toString;function X3(e){return G3.call(e)}var J3=X3,fN=uN,Z3=K3,Q3=J3,ez="[object Null]",tz="[object Undefined]",hN=fN?fN.toStringTag:void 0;function nz(e){return e==null?e===void 0?tz:ez:hN&&hN in Object(e)?Z3(e):Q3(e)}var pN=nz;function rz(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var Lc=rz,iz=pN,az=Lc,sz="[object AsyncFunction]",oz="[object Function]",lz="[object GeneratorFunction]",uz="[object Proxy]";function cz(e){if(!az(e))return!1;var t=iz(e);return t==oz||t==lz||t==sz||t==uz}var dz=cz,fz=Ac,hz=fz["__core-js_shared__"],pz=hz,Gg=pz,gN=function(){var e=/[^.]+$/.exec(Gg&&Gg.keys&&Gg.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function gz(e){return!!gN&&gN in e}var mz=gz,vz=Function.prototype,yz=vz.toString;function xz(e){if(e!=null){try{return yz.call(e)}catch{}try{return e+""}catch{}}return""}var bz=xz,_z=dz,wz=mz,kz=Lc,Sz=bz,Nz=/[\\^$.*+?()[\]{}|]/g,Ez=/^\[object .+?Constructor\]$/,Tz=Function.prototype,Cz=Object.prototype,Mz=Tz.toString,jz=Cz.hasOwnProperty,Oz=RegExp("^"+Mz.call(jz).replace(Nz,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function $z(e){if(!kz(e)||wz(e))return!1;var t=_z(e)?Oz:Ez;return t.test(Sz(e))}var Pz=$z;function Az(e,t){return e==null?void 0:e[t]}var Lz=Az,Dz=Pz,Iz=Lz;function Fz(e,t){var n=Iz(e,t);return Dz(n)?n:void 0}var mN=Fz,zz=mN,Rz=zz(Object,"create"),Dc=Rz,vN=Dc;function Bz(){this.__data__=vN?vN(null):{},this.size=0}var Wz=Bz;function Uz(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Hz=Uz,qz=Dc,Vz="__lodash_hash_undefined__",Kz=Object.prototype,Yz=Kz.hasOwnProperty;function Gz(e){var t=this.__data__;if(qz){var n=t[e];return n===Vz?void 0:n}return Yz.call(t,e)?t[e]:void 0}var Xz=Gz,Jz=Dc,Zz=Object.prototype,Qz=Zz.hasOwnProperty;function e5(e){var t=this.__data__;return Jz?t[e]!==void 0:Qz.call(t,e)}var t5=e5,n5=Dc,r5="__lodash_hash_undefined__";function i5(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=n5&&t===void 0?r5:t,this}var a5=i5,s5=Wz,o5=Hz,l5=Xz,u5=t5,c5=a5;function Es(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Es.prototype.clear=s5,Es.prototype.delete=o5,Es.prototype.get=l5,Es.prototype.has=u5,Es.prototype.set=c5;var d5=Es;function f5(){this.__data__=[],this.size=0}var h5=f5;function p5(e,t){return e===t||e!==e&&t!==t}var g5=p5,m5=g5;function v5(e,t){for(var n=e.length;n--;)if(m5(e[n][0],t))return n;return-1}var Ic=v5,y5=Ic,x5=Array.prototype,b5=x5.splice;function _5(e){var t=this.__data__,n=y5(t,e);if(n<0)return!1;var r=t.length-1;return n==r?t.pop():b5.call(t,n,1),--this.size,!0}var w5=_5,k5=Ic;function S5(e){var t=this.__data__,n=k5(t,e);return n<0?void 0:t[n][1]}var N5=S5,E5=Ic;function T5(e){return E5(this.__data__,e)>-1}var C5=T5,M5=Ic;function j5(e,t){var n=this.__data__,r=M5(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this}var O5=j5,$5=h5,P5=w5,A5=N5,L5=C5,D5=O5;function Ts(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Ts.prototype.clear=$5,Ts.prototype.delete=P5,Ts.prototype.get=A5,Ts.prototype.has=L5,Ts.prototype.set=D5;var I5=Ts,F5=mN,z5=Ac,R5=F5(z5,"Map"),B5=R5,yN=d5,W5=I5,U5=B5;function H5(){this.size=0,this.__data__={hash:new yN,map:new(U5||W5),string:new yN}}var q5=H5;function V5(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var K5=V5,Y5=K5;function G5(e,t){var n=e.__data__;return Y5(t)?n[typeof t=="string"?"string":"hash"]:n.map}var Fc=G5,X5=Fc;function J5(e){var t=X5(this,e).delete(e);return this.size-=t?1:0,t}var Z5=J5,Q5=Fc;function eR(e){return Q5(this,e).get(e)}var tR=eR,nR=Fc;function rR(e){return nR(this,e).has(e)}var iR=rR,aR=Fc;function sR(e,t){var n=aR(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this}var oR=sR,lR=q5,uR=Z5,cR=tR,dR=iR,fR=oR;function Cs(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}Cs.prototype.clear=lR,Cs.prototype.delete=uR,Cs.prototype.get=cR,Cs.prototype.has=dR,Cs.prototype.set=fR;var hR=Cs,xN=hR,pR="Expected a function";function Xg(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(pR);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var s=e.apply(this,r);return n.cache=a.set(i,s)||a,s};return n.cache=new(Xg.Cache||xN),n}Xg.Cache=xN;var gR=Xg;const mR=qs(gR);var bN="__react_svg_text_measurement_id";function vR(e,t){try{var n=document.getElementById(bN);if(!n){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttribute("aria-hidden","true"),r.style.width="0",r.style.height="0",r.style.position="absolute",r.style.top="-100%",r.style.left="-100%",n=document.createElementNS("http://www.w3.org/2000/svg","text"),n.setAttribute("id",bN),r.appendChild(n),document.body.appendChild(r)}return Object.assign(n.style,t),n.textContent=e,n.getComputedTextLength()}catch{return null}}const Jg=mR(vR,function(e,t){return e+"_"+JSON.stringify(t)});var yR=["verticalAnchor","scaleToFit","angle","width","lineHeight","capHeight","children","style"];function xR(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Zg(e){return typeof e=="number"}function _N(e){return typeof e=="number"&&Number.isFinite(e)||typeof e=="string"}function wN(e){var t=e.verticalAnchor,n=t===void 0?"end":t,r=e.scaleToFit,i=r===void 0?!1:r,a=e.angle,s=e.width,o=e.lineHeight,l=o===void 0?"1em":o,u=e.capHeight,c=u===void 0?"0.71em":u,d=e.children,f=e.style,g=xR(e,yR),p=g.x,m=p===void 0?0:p,v=g.y,x=v===void 0?0:v,y=!_N(m)||!_N(x),b=_.useMemo(function(){var T=d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/);return{wordsWithWidth:T.map(function(C){return{word:C,wordWidth:Jg(C,f)||0}}),spaceWidth:Jg(" ",f)||0}},[d,f]),k=b.wordsWithWidth,w=b.spaceWidth,S=_.useMemo(function(){return y?[]:s||i?k.reduce(function(T,C){var O=C.word,$=C.wordWidth,M=T[T.length-1];if(M&&(s==null||i||(M.width||0)+$+w<s))M.words.push(O),M.width=M.width||0,M.width+=$+w;else{var j={words:[O],width:$};T.push(j)}return T},[]):[{words:d==null?[]:d.toString().split(/(?:(?!\u00A0+)\s+)/)}]},[y,s,i,d,k,w]),N=_.useMemo(function(){var T=y?"":Yg(n==="start"?"calc("+c+")":n==="middle"?"calc("+(S.length-1)/2+" * -"+l+" + ("+c+" / 2))":"calc("+(S.length-1)+" * -"+l+")");return T},[y,n,c,S.length,l]),E=_.useMemo(function(){var T=[];if(y)return"";if(Zg(m)&&Zg(x)&&Zg(s)&&i&&S.length>0){var C=S[0].width||1,O=i==="shrink-only"?Math.min(s/C,1):s/C,$=O,M=m-O*m,j=x-$*x;T.push("matrix("+O+", 0, 0, "+$+", "+M+", "+j+")")}return a&&T.push("rotate("+a+", "+m+", "+x+")"),T.length>0?T.join(" "):""},[y,m,x,s,i,S,a]);return{wordsByLines:S,startDy:N,transform:E}}var bR=["dx","dy","textAnchor","innerRef","innerTextRef","verticalAnchor","angle","lineHeight","scaleToFit","capHeight","width"];function Qg(){return Qg=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qg.apply(this,arguments)}function _R(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var wR={overflow:"visible"};function em(e){var t=e.dx,n=t===void 0?0:t,r=e.dy,i=r===void 0?0:r,a=e.textAnchor,s=a===void 0?"start":a,o=e.innerRef,l=e.innerTextRef;e.verticalAnchor,e.angle;var u=e.lineHeight,c=u===void 0?"1em":u;e.scaleToFit,e.capHeight,e.width;var d=_R(e,bR),f=d.x,g=f===void 0?0:f,p=d.fontSize,m=wN(e),v=m.wordsByLines,x=m.startDy,y=m.transform;return _.createElement("svg",{ref:o,x:n,y:i,fontSize:p,style:wR},v.length>0?_.createElement("text",Qg({ref:l,transform:y},d,{textAnchor:s}),v.map(function(b,k){return _.createElement("tspan",{key:k,x:g,dy:k===0?x:c},b.words.join(" "))})):null)}const kR=Object.freeze(Object.defineProperty({__proto__:null,Text:em,getStringWidth:Jg,useText:wN},Symbol.toStringTag,{value:"Module"}));var En={top:"top",left:"left",bottom:"bottom"};function SR(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,i=e.range,a=e.tickLabelFontSize,s=e.tickLength,o=r===En.left||r===En.top?-1:1,l,u,c;if(r===En.top||r===En.bottom){var d=r===En.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,u=o*(s+t+a+d)}else l=o*((Number(i[0])+Number(i[i.length-1]))/2),u=-(s+t),c="rotate("+o*90+")";return{x:l,y:u,transform:c}}function al(){return al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},al.apply(this,arguments)}function NR(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.tickClassName,a=e.tickComponent,s=e.tickLabelProps,o=e.tickStroke,l=o===void 0?"#222":o,u=e.tickTransform,c=e.ticks,d=e.strokeWidth,f=e.tickLineProps;return c.map(function(g){var p,m=g.value,v=g.index,x=g.from,y=g.to,b=g.formattedValue,k=(p=s[v])!=null?p:{},w=Math.max(10,typeof k.fontSize=="number"&&k.fontSize||0),S=y.y+(n&&r!==En.top?w:0);return _.createElement(ct,{key:"visx-tick-"+m+"-"+v,className:$e("visx-axis-tick",i),transform:u},!t&&_.createElement(vg,al({from:x,to:y,stroke:l,strokeWidth:d,strokeLinecap:"square"},f)),a?a(al({},k,{x:y.x,y:S,formattedValue:b})):_.createElement(em,al({x:y.x,y:S},k),b))})}function sl(){return sl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sl.apply(this,arguments)}var kN={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function ER(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,i=e.hideAxisLine,a=e.hideTicks,s=e.horizontal,o=e.label,l=o===void 0?"":o,u=e.labelClassName,c=e.labelOffset,d=c===void 0?14:c,f=e.labelProps,g=e.orientation,p=g===void 0?En.bottom:g,m=e.scale,v=e.stroke,x=v===void 0?"#222":v,y=e.strokeDasharray,b=e.strokeWidth,k=b===void 0?1:b,w=e.tickClassName,S=e.tickComponent,N=e.tickLineProps,E=e.tickLabelProps,T=e.tickLength,C=T===void 0?8:T,O=e.tickStroke,$=O===void 0?"#222":O,M=e.tickTransform,j=e.ticks,P=e.ticksComponent,F=P===void 0?NR:P,B=sl({},kN,f),W=sl({},kN,typeof E=="object"?E:null),q=j.map(function(A){var U=A.value,Y=A.index;return typeof E=="function"?E(U,Y,j):W}),D=Math.max.apply(Math,[10].concat(q.map(function(A){return typeof A.fontSize=="number"?A.fontSize:0})));return _.createElement(_.Fragment,null,F({hideTicks:a,horizontal:s,orientation:p,scale:m,tickClassName:w,tickComponent:S,tickLabelProps:q,tickStroke:$,tickTransform:M,ticks:j,strokeWidth:k,tickLineProps:N}),!i&&_.createElement(vg,{className:$e("visx-axis-line",n),from:t,to:r,stroke:x,strokeWidth:k,strokeDasharray:y}),l&&_.createElement(em,sl({className:$e("visx-axis-label",u)},SR({labelOffset:d,labelProps:B,orientation:p,range:m.range(),tickLabelFontSize:D,tickLength:C}),B),l))}function TR(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(i){var a=n(i);return typeof a=="number"?a+r:a}}return e}function CR(e){var t=e;return"tickFormat"in t?t.tickFormat():zk}var Ms=function(){function e(n){var r=n.x,i=r===void 0?0:r,a=n.y,s=a===void 0?0:a;this.x=0,this.y=0,this.x=i,this.y=s}var t=e.prototype;return t.value=function(){return{x:this.x,y:this.y}},t.toArray=function(){return[this.x,this.y]},e}();function MR(e,t){return new Ms({x:e.x+t.x,y:e.y+t.y})}function jR(e,t){return new Ms({x:e.x-t.x,y:e.y-t.y})}const OR=Object.freeze(Object.defineProperty({__proto__:null,Point:Ms,subtractPoints:jR,sumPoints:MR},Symbol.toStringTag,{value:"Module"}));function zc(e,t){var n=e.x,r=e.y;return new Ms(t?{x:n,y:r}:{x:r,y:n})}function tm(){return tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},tm.apply(this,arguments)}var nm=0;function $R(e){return e===void 0&&(e=nm),typeof e=="number"?{start:e,end:e}:tm({start:nm,end:nm},e)}var PR=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function rm(){return rm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},rm.apply(this,arguments)}function AR(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function SN(e){var t=e.children,n=t===void 0?ER:t,r=e.axisClassName,i=e.hideAxisLine,a=i===void 0?!1:i,s=e.hideTicks,o=s===void 0?!1:s,l=e.hideZero,u=l===void 0?!1:l,c=e.innerRef,d=e.left,f=d===void 0?0:d,g=e.numTicks,p=g===void 0?10:g,m=e.orientation,v=m===void 0?En.bottom:m,x=e.rangePadding,y=x===void 0?0:x,b=e.scale,k=e.tickFormat,w=e.tickLength,S=w===void 0?8:w,N=e.tickValues,E=e.top,T=E===void 0?0:E,C=AR(e,PR),O=k??CR(b),$=v===En.left,M=v===En.top,j=M||v===En.bottom,P=TR(b),F=$||M?-1:1,B=b.range(),W=$R(y),q=zc({x:Number(B[0])+.5-W.start,y:0},j),D=zc({x:Number(B[B.length-1])+.5+W.end,y:0},j),A=(N??Fk(b,p)).filter(function(Y){return!u||Y!==0&&Y!=="0"}).map(function(Y,G){return{value:Y,index:G}}),U=A.map(function(Y){var G=Y.value,J=Y.index,R=Ik(P(G));return{value:G,index:J,from:zc({x:R,y:0},j),to:zc({x:R,y:S*F},j),formattedValue:O(G,J,A)}});return _.createElement(ct,{className:$e("visx-axis",r),innerRef:c,top:T,left:f},n(rm({},C,{axisFromPoint:q,axisToPoint:D,hideAxisLine:a,hideTicks:o,hideZero:u,horizontal:j,numTicks:p,orientation:v,rangePadding:y,scale:b,tickFormat:O,tickLength:S,tickPosition:P,tickSign:F,ticks:U})))}var LR=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Rc(){return Rc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rc.apply(this,arguments)}function DR(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var IR={dx:"-0.25em",dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"end"};function ol(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?36:n,i=e.tickLength,a=i===void 0?8:i,s=e.tickLabelProps,o=DR(e,LR),l=typeof s=="function"?s:Rc({},IR,s);return _.createElement(SN,Rc({axisClassName:$e("visx-axis-left",t),labelOffset:r,orientation:En.left,tickLabelProps:l,tickLength:a},o))}var FR=["axisClassName","labelOffset","tickLength","tickLabelProps"];function Bc(){return Bc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Bc.apply(this,arguments)}function zR(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var RR={dy:"0.25em",fill:"#222",fontFamily:"Arial",fontSize:10,textAnchor:"middle"};function Na(e){var t=e.axisClassName,n=e.labelOffset,r=n===void 0?8:n,i=e.tickLength,a=i===void 0?8:i,s=e.tickLabelProps,o=zR(e,FR),l=typeof s=="function"?s:Bc({},RR,s);return _.createElement(SN,Bc({axisClassName:$e("visx-axis-bottom",t),labelOffset:r,orientation:En.bottom,tickLabelProps:l,tickLength:a},o))}var im={};const Wc=Gn(OR);function BR(e){return!!e&&e instanceof Element}function WR(e){return!!e&&(e instanceof SVGElement||"ownerSVGElement"in e)}function UR(e){return!!e&&"createSVGPoint"in e}function HR(e){return!!e&&"getScreenCTM"in e}function qR(e){return!!e&&"changedTouches"in e}function VR(e){return!!e&&"clientX"in e}function KR(e){return!!e&&(e instanceof Event||"nativeEvent"in e&&e.nativeEvent instanceof Event)}function ll(){return ll=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ll.apply(this,arguments)}var am={x:0,y:0};function YR(e){if(!e)return ll({},am);if(qR(e))return e.changedTouches.length>0?{x:e.changedTouches[0].clientX,y:e.changedTouches[0].clientY}:ll({},am);if(VR(e))return{x:e.clientX,y:e.clientY};var t=e==null?void 0:e.target,n=t&&"getBoundingClientRect"in t?t.getBoundingClientRect():null;return n?{x:n.x+n.width/2,y:n.y+n.height/2}:ll({},am)}function sm(e,t){if(!e||!t)return null;var n=YR(t),r=WR(e)?e.ownerSVGElement:e,i=HR(r)?r.getScreenCTM():null;if(UR(r)&&i){var a=r.createSVGPoint();return a.x=n.x,a.y=n.y,a=a.matrixTransform(i.inverse()),new Ms({x:a.x,y:a.y})}var s=e.getBoundingClientRect();return new Ms({x:n.x-s.left-e.clientLeft,y:n.y-s.top-e.clientTop})}function NN(e,t){if(BR(e)&&t)return sm(e,t);if(KR(e)){var n=e,r=n.target;if(r)return sm(r,n)}return null}const GR=Gn(Object.freeze(Object.defineProperty({__proto__:null,localPoint:NN,touchPoint:sm},Symbol.toStringTag,{value:"Module"})));var om={};om.__esModule=!0,om.default=XR;var Uc=_;function XR(e){var t=(0,Uc.useState)(e),n=t[0],r=t[1],i=(0,Uc.useRef)(null),a=(0,Uc.useCallback)(function(s,o){i.current=o||null,r(s)},[r]);return(0,Uc.useLayoutEffect)(function(){i.current&&(i.current(n),i.current=null)},[n]),[n,a]}var lm={},um={};um.__esModule=!0,um.default=JR;function JR(e,t,n){return Math.min(Math.max(e,t),n)}var cm={};cm.__esModule=!0,cm.default=eB;function ZR(e,t){var n=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=QR(e))||t){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
331
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function QR(e,t){if(e){if(typeof e=="string")return EN(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return EN(e,t)}}function EN(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function eB(e,t){for(var n=e,r=1/0,i=ZR(t),a;!(a=i()).done;){var s=a.value,o=Math.sqrt(Math.pow(s.x-e.x,2)+Math.pow(s.y-e.y,2));o<r&&(r=o,n={x:s.x,y:s.y})}return n}lm.__esModule=!0,lm.default=nB;var TN=CN(um),tB=CN(cm);function CN(e){return e&&e.__esModule?e:{default:e}}function nB(e,t,n){var r,i,a,s;return n===void 0&&(n={}),t.length>0?(0,tB.default)(e,t):{x:(0,TN.default)(e.x,(r=n.xMin)!=null?r:-1/0,(i=n.xMax)!=null?i:1/0),y:(0,TN.default)(e.y,(a=n.yMin)!=null?a:-1/0,(s=n.yMax)!=null?s:1/0)}}var dm={};dm.__esModule=!0,dm.default=aB;var rB=_;function iB(e,t,n){if(n===void 0&&(n=1),!e)return[];for(var r=[],i=e.getTotalLength(),a=0;a<=i;a+=n){var s=e.getPointAtLength(a),o=s.matrixTransform(t);r.push(o)}return r}function aB(e){var t=(0,rB.useMemo)(function(){if(!e)return[];var n=e.getCTM()||new DOMMatrix;return iB(e,n)},[e==null?void 0:e.getTotalLength()]);return t}im.__esModule=!0,im.default=lB;var Ea=_,js=Wc,MN=GR,sB=fm(om),jN=fm(lm),oB=fm(dm);function fm(e){return e&&e.__esModule?e:{default:e}}function jr(){return jr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jr.apply(this,arguments)}function lB(e){var t=e===void 0?{}:e,n=t.resetOnStart,r=n===void 0?!1:n,i=t.snapToPointer,a=i===void 0?!0:i,s=t.onDragEnd,o=t.onDragMove,l=t.onDragStart,u=t.x,c=t.y,d=t.dx,f=t.dy,g=t.isDragging,p=t.restrict,m=p===void 0?{}:p,v=t.restrictToPath,x=(0,Ea.useRef)({x:u,y:c,dx:d,dy:f}),y=(0,sB.default)({x:u,y:c,dx:d??0,dy:f??0,isDragging:!1}),b=y[0],k=y[1],w=(0,Ea.useState)(new js.Point({x:0,y:0})),S=w[0],N=w[1];(0,Ea.useEffect)(function(){(x.current.x!==u||x.current.y!==c||x.current.dx!==d||x.current.dy!==f)&&(x.current={x:u,y:c,dx:d,dy:f},k(function($){return jr({},$,{x:u,y:c,dx:d??0,dy:f??0})}))}),(0,Ea.useEffect)(function(){g!==void 0&&b.isDragging!==g&&k(function($){return jr({},$,{isDragging:g})})},[b.isDragging,g,k]);var E=(0,oB.default)(v),T=(0,Ea.useCallback)(function($){$.persist(),k(function(M){var j=M.x,P=j===void 0?0:j,F=M.y,B=F===void 0?0:F,W=M.dx,q=M.dy,D=new js.Point({x:(P||0)+W,y:(B||0)+q}),A=(0,MN.localPoint)($)||new js.Point({x:0,y:0}),U=a?A:D,Y=(0,jN.default)(U,E,m);return N((0,js.subtractPoints)(D,A)),{isDragging:!0,dx:r?0:M.dx,dy:r?0:M.dy,x:r?Y.x:Y.x-M.dx,y:r?Y.y:Y.y-M.dy}},l&&function(M){l(jr({},M,{event:$}))})},[l,r,m,E,k,a]),C=(0,Ea.useCallback)(function($){$.persist(),k(function(M){if(!M.isDragging)return M;var j=M.x,P=j===void 0?0:j,F=M.y,B=F===void 0?0:F,W=(0,MN.localPoint)($)||new js.Point({x:0,y:0}),q=a?W:(0,js.sumPoints)(W,S),D=(0,jN.default)(q,E,m);return jr({},M,{dx:D.x-P,dy:D.y-B})},o&&function(M){M.isDragging&&o(jr({},M,{event:$}))})},[k,o,a,S,E,m]),O=(0,Ea.useCallback)(function($){$.persist(),k(function(M){return jr({},M,{isDragging:!1})},s&&function(M){s(jr({},M,{event:$}))})},[s,k]);return jr({},b,{dragEnd:O,dragMove:C,dragStart:T})}var Hc=ON,ul=pm(yi),hm=pm(_),uB=pm(im);function pm(e){return e&&e.__esModule?e:{default:e}}function ON(e){var t=e.captureDragArea,n=t===void 0?!0:t,r=e.snapToPointer,i=r===void 0?!0:r,a=e.children,s=e.dx,o=e.dy,l=e.height,u=e.onDragEnd,c=e.onDragMove,d=e.onDragStart,f=e.resetOnStart,g=e.width,p=e.x,m=e.y,v=e.isDragging,x=e.restrict,y=e.restrictToPath,b=(0,uB.default)({resetOnStart:f,snapToPointer:i,onDragEnd:u,onDragMove:c,onDragStart:d,x:p,y:m,dx:s,dy:o,isDragging:v,restrict:x,restrictToPath:y});return hm.default.createElement(hm.default.Fragment,null,b.isDragging&&n&&hm.default.createElement("rect",{width:g,height:l,onPointerDown:b.dragStart,onPointerMove:b.dragMove,onPointerUp:b.dragEnd,fill:"transparent"}),a(b))}ON.propTypes={children:ul.default.func.isRequired,width:ul.default.number.isRequired,height:ul.default.number.isRequired,captureDragArea:ul.default.bool,isDragging:ul.default.bool};function qc(e,t){if("invert"in e&&typeof e.invert<"u")return e.invert(t).valueOf();var n=e.range(),r=n[0],i=n[1],a=0,s="step"in e&&typeof e.step<"u"?e.step():1,o=s*(i-r)/Math.abs(i-r);if(o>0)for(;t>r+o*(a+1);)a+=1;else for(;t<r+o*(a+1);)a+=1;return a}function $N(e,t,n,r){var i,a=qc(e,t+(t<n?-r:r)),s=qc(e,n+(n<t?-r:r)),o=Math.min(a,s),l=Math.max(a,s);if("invert"in e&&typeof e.invert<"u")i={start:o,end:l};else{for(var u=[],c=e.domain(),d=o;d<=l;d+=1)u.push(c[d]);i={values:u}}return i}function gm(e){if(typeof window<"u"&&window.TouchEvent&&e instanceof TouchEvent)return{pageX:e.touches[0].pageX,pageY:e.touches[0].pageY};var t=e;return{pageX:t.pageX,pageY:t.pageY}}function cB(e,t){var n;return function(){for(var i=this,a=arguments.length,s=new Array(a),o=0;o<a;o++)s[o]=arguments[o];clearTimeout(n),n=setTimeout(function(){e.apply(i,s)},t)}}function Hn(){return Hn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hn.apply(this,arguments)}function dB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,mm(e,t)}function mm(e,t){return mm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},mm(e,t)}var PN=function(e){dB(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.handleDragStart=function(o){var l=r.props,u=l.onBrushHandleChange,c=l.type,d=l.onBrushStart;u&&u(c,gm(o.event)),d&&d(o)},r.handleDragMove=function(o){var l=r.props,u=l.updateBrush,c=l.type,d=l.isControlled;!o.isDragging||d||u(function(f){var g=f.start,p=f.end,m=0,v=Math.max(g.x,p.x),x=Math.min(g.x,p.x),y=Math.max(g.y,p.y),b=Math.min(g.y,p.y);switch(c){case"right":return m=v+o.dx,Hn({},f,{activeHandle:c,extent:Hn({},f.extent,{x0:Math.max(Math.min(m,g.x),f.bounds.x0),x1:Math.min(Math.max(m,g.x),f.bounds.x1)})});case"left":return m=x+o.dx,Hn({},f,{activeHandle:c,extent:Hn({},f.extent,{x0:Math.min(m,p.x),x1:Math.max(m,p.x)})});case"bottom":return m=y+o.dy,Hn({},f,{activeHandle:c,extent:Hn({},f.extent,{y0:Math.min(m,g.y),y1:Math.max(m,g.y)})});case"top":return m=b+o.dy,Hn({},f,{activeHandle:c,extent:Hn({},f.extent,{y0:Math.min(m,p.y),y1:Math.max(m,p.y)})});default:return f}})},r.handleDragEnd=function(){var o=r.props,l=o.updateBrush,u=o.onBrushEnd,c=o.onBrushHandleChange,d=o.isControlled;d||l(function(f){var g=f.start,p=f.end,m=f.extent;g.x=Math.min(m.x0,m.x1),g.y=Math.min(m.y0,m.y0),p.x=Math.max(m.x0,m.x1),p.y=Math.max(m.y0,m.y1);var v=Hn({},f,{start:g,end:p,activeHandle:null,isBrushing:!1,extent:{x0:Math.min(g.x,p.x),x1:Math.max(g.x,p.x),y0:Math.min(g.y,p.y),y1:Math.max(g.y,p.y)}});return u&&u(v),v}),c&&c()},r}var n=t.prototype;return n.render=function(){var i=this,a=this.props,s=a.stageWidth,o=a.stageHeight,l=a.brush,u=a.type,c=a.handle,d=a.isControlled,f=a.isDragInProgress,g=a.renderBrushHandle,p=c.x,m=c.y,v=c.width,x=c.height,y=u==="right"||u==="left"?"ew-resize":"ns-resize";return _.createElement(Hc,{width:s,height:o,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,resetOnStart:!0,isDragging:d?f:void 0},function(b){var k=b.dragStart,w=b.dragEnd,S=b.dragMove,N=b.isDragging;return _.createElement("g",null,N&&_.createElement("rect",{fill:"transparent",width:s,height:o,style:{cursor:y},onPointerMove:S,onPointerUp:d?void 0:w,onPointerLeave:d?void 0:w}),!g&&_.createElement("rect",{x:p,y:m,width:v,height:x,fill:"transparent",className:"visx-brush-handle-"+u,onPointerDown:k,onPointerMove:S,onPointerUp:d?void 0:w,style:{cursor:y,pointerEvents:l.activeHandle||l.isBrushing?"none":"all"}}),g&&_.createElement("g",{onPointerDown:k,onPointerMove:S,onPointerUp:d?void 0:w},g(Hn({},i.props.handle,{height:o,className:"visx-brush-handle-"+u,isBrushActive:l.extent.x0!==-1&&l.extent.x1!==-1}))))})},t}(_.Component);PN.propTypes={stageWidth:V.number.isRequired,stageHeight:V.number.isRequired,updateBrush:V.func.isRequired,onBrushStart:V.func,onBrushEnd:V.func,handle:V.shape({x:V.number.isRequired,y:V.number.isRequired,width:V.number.isRequired,height:V.number.isRequired}).isRequired,isControlled:V.bool,isDragInProgress:V.bool,onBrushHandleChange:V.func,renderBrushHandle:V.func};function Tn(){return Tn=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tn.apply(this,arguments)}function fB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,vm(e,t)}function vm(e,t){return vm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},vm(e,t)}var ym=function(e){fB(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.cornerDragMove=function(o){var l=r.props,u=l.updateBrush,c=l.type;o.isDragging&&u(function(d){var f=d.start,g=d.end,p=Math.max(f.x,g.x),m=Math.min(f.x,g.x),v=Math.max(f.y,g.y),x=Math.min(f.y,g.y),y=0,b=0;switch(c){case"topRight":return y=p+o.dx,b=x+o.dy,Tn({},d,{activeHandle:c,extent:Tn({},d.extent,{x0:Math.max(Math.min(y,f.x),d.bounds.x0),x1:Math.min(Math.max(y,f.x),d.bounds.x1),y0:Math.max(Math.min(b,g.y),d.bounds.y0),y1:Math.min(Math.max(b,g.y),d.bounds.y1)})});case"topLeft":return y=m+o.dx,b=x+o.dy,Tn({},d,{activeHandle:c,extent:Tn({},d.extent,{x0:Math.max(Math.min(y,g.x),d.bounds.x0),x1:Math.min(Math.max(y,g.x),d.bounds.x1),y0:Math.max(Math.min(b,g.y),d.bounds.y0),y1:Math.min(Math.max(b,g.y),d.bounds.y1)})});case"bottomLeft":return y=m+o.dx,b=v+o.dy,Tn({},d,{activeHandle:c,extent:Tn({},d.extent,{x0:Math.max(Math.min(y,g.x),d.bounds.x0),x1:Math.min(Math.max(y,g.x),d.bounds.x1),y0:Math.max(Math.min(b,f.y),d.bounds.y0),y1:Math.min(Math.max(b,f.y),d.bounds.y1)})});case"bottomRight":return y=p+o.dx,b=v+o.dy,Tn({},d,{activeHandle:c,extent:Tn({},d.extent,{x0:Math.max(Math.min(y,f.x),d.bounds.x0),x1:Math.min(Math.max(y,f.x),d.bounds.x1),y0:Math.max(Math.min(b,f.y),d.bounds.y0),y1:Math.min(Math.max(b,f.y),d.bounds.y1)})});default:return d}})},r.cornerDragEnd=function(){var o=r.props,l=o.updateBrush,u=o.onBrushEnd;l(function(c){var d=c.start,f=c.end,g=c.extent;d.x=Math.min(g.x0,g.x1),d.y=Math.min(g.y0,g.y0),f.x=Math.max(g.x0,g.x1),f.y=Math.max(g.y0,g.y1);var p=Tn({},c,{start:d,end:f,activeHandle:null,domain:{x0:Math.min(d.x,f.x),x1:Math.max(d.x,f.x),y0:Math.min(d.y,f.y),y1:Math.max(d.y,f.y)}});return u&&u(p),p})},r}var n=t.prototype;return n.render=function(){var i=this.props,a=i.type,s=i.brush,o=i.stageWidth,l=i.stageHeight,u=i.style,c=i.corner,d=(u==null?void 0:u.cursor)||(a==="topLeft"||a==="bottomRight"?"nwse-resize":"nesw-resize"),f=s.activeHandle||s.isBrushing?"none":"all";return _.createElement(Hc,{width:o,height:l,onDragMove:this.cornerDragMove,onDragEnd:this.cornerDragEnd,resetOnStart:!0},function(g){var p=g.dragMove,m=g.dragEnd,v=g.dragStart,x=g.isDragging;return _.createElement("g",null,x&&_.createElement("rect",{fill:"transparent",width:o,height:l,style:{cursor:d},onPointerMove:p,onPointerUp:m}),_.createElement("rect",Tn({fill:"transparent",onPointerDown:v,onPointerMove:p,onPointerUp:m,className:"visx-brush-corner-"+a,style:Tn({cursor:d,pointerEvents:f},u)},c)))})},t}(_.Component);ym.propTypes={stageWidth:V.number.isRequired,stageHeight:V.number.isRequired,updateBrush:V.func.isRequired,onBrushEnd:V.func,corner:V.shape({x:V.number.isRequired,y:V.number.isRequired,width:V.number.isRequired,height:V.number.isRequired}).isRequired},ym.defaultProps={style:{}};function Ci(){return Ci=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ci.apply(this,arguments)}function hB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,xm(e,t)}function xm(e,t){return xm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},xm(e,t)}var pB={cursor:"move"},bm=function(e){hB(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.selectionDragStart=function(o){var l=r.props,u=l.onMoveSelectionChange,c=l.onBrushStart;u&&u("move",gm(o.event)),c&&c(o)},r.selectionDragMove=function(o){var l=r.props,u=l.updateBrush,c=l.isControlled;c||u(function(d){var f=d.start,g=f.x,p=f.y,m=d.end,v=m.x,x=m.y,y=o.dx>0?Math.min(o.dx,d.bounds.x1-v):Math.max(o.dx,d.bounds.x0-g),b=o.dy>0?Math.min(o.dy,d.bounds.y1-x):Math.max(o.dy,d.bounds.y0-p);return Ci({},d,{isBrushing:!0,extent:Ci({},d.extent,{x0:g+y,x1:v+y,y0:p+b,y1:x+b})})})},r.selectionDragEnd=function(){var o=r.props,l=o.updateBrush,u=o.onBrushEnd,c=o.onMoveSelectionChange,d=o.isControlled;d||l(function(f){var g=Ci({},f,{isBrushing:!1,start:Ci({},f.start,{x:Math.min(f.extent.x0,f.extent.x1),y:Math.min(f.extent.y0,f.extent.y1)}),end:Ci({},f.end,{x:Math.max(f.extent.x0,f.extent.x1),y:Math.max(f.extent.y0,f.extent.y1)})});return u&&u(g),g}),c&&c()},r}var n=t.prototype;return n.render=function(){var i=this.props,a=i.width,s=i.height,o=i.stageWidth,l=i.stageHeight,u=i.brush,c=i.disableDraggingSelection,d=i.onMouseLeave,f=i.onMouseMove,g=i.onMouseUp,p=i.onClick,m=i.selectedBoxStyle,v=i.isControlled,x=i.isDragInProgress;return _.createElement(Hc,{width:a,height:s,resetOnStart:!0,onDragStart:this.selectionDragStart,onDragMove:this.selectionDragMove,onDragEnd:this.selectionDragEnd,isDragging:v?x:void 0},function(y){var b=y.isDragging,k=y.dragStart,w=y.dragEnd,S=y.dragMove;return _.createElement("g",null,b&&_.createElement("rect",{width:o,height:l,fill:"transparent",onPointerUp:v?void 0:w,onPointerMove:S,onPointerLeave:v?void 0:w,style:pB}),_.createElement("rect",Ci({x:Math.min(u.extent.x0,u.extent.x1),y:Math.min(u.extent.y0,u.extent.y1),width:a,height:s,className:"visx-brush-selection",onPointerDown:c?void 0:k,onPointerLeave:function(E){d&&d(E)},onPointerMove:function(E){S(E),f&&f(E)},onPointerUp:function(E){v||w(E),g&&g(E)},onClick:function(E){p&&p(E)},style:{pointerEvents:u.isBrushing||u.activeHandle?"none":"all",cursor:c?void 0:"move"}},m)))})},t}(_.Component);bm.propTypes={width:V.number.isRequired,height:V.number.isRequired,stageWidth:V.number.isRequired,stageHeight:V.number.isRequired,updateBrush:V.func.isRequired,onMoveSelectionChange:V.func,onBrushStart:V.func,onBrushEnd:V.func,disableDraggingSelection:V.bool.isRequired,onMouseLeave:V.func,onMouseMove:V.func,onMouseUp:V.func,onClick:V.func,isControlled:V.bool,isDragInProgress:V.bool},bm.defaultProps={onMouseLeave:null,onMouseUp:null,onMouseMove:null,onClick:null};function _m(){return _m=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},_m.apply(this,arguments)}function wm(e){return _.createElement(Ei,_m({className:"visx-brush-overlay",fill:"transparent",x:0,y:0},e))}wm.propTypes={width:V.number.isRequired,height:V.number.isRequired,onClick:V.func,onDoubleClick:V.func,onPointerDown:V.func,onPointerLeave:V.func,onPointerMove:V.func,onPointerUp:V.func};function an(){return an=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},an.apply(this,arguments)}function gB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,km(e,t)}function km(e,t){return km=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},km(e,t)}var Sm=function(e){gB(t,e);function t(r){var i;i=e.call(this,r)||this,i.mouseUpTime=0,i.mouseDownTime=0,i.getIdleState=function(){var o=i.props,l=o.width,u=o.height;return{start:{x:0,y:0},end:{x:0,y:0},extent:{x0:-1,x1:-1,y0:-1,y1:-1},bounds:{x0:0,x1:l,y0:0,y1:u},isBrushing:!1,brushPageOffset:void 0,activeHandle:null,brushingType:void 0}},i.handleWindowPointerUp=function(){var o=i.props,l=o.useWindowMoveEvents,u=o.onBrushEnd,c=o.resetOnEnd,d=i.state.brushingType;l&&d&&i.updateBrush(function(f){var g=f.start,p=f.end,m=f.extent;g.x=Math.min(m.x0,m.x1),g.y=Math.min(m.y0,m.y0),p.x=Math.max(m.x0,m.x1),p.y=Math.max(m.y0,m.y1);var v=an({},f,{activeHandle:null,isBrushing:!1,brushingType:void 0});return u&&u(v),c&&(v=an({},v,i.getIdleState())),v})},i.handleWindowPointerMove=function(o){var l=i.props.useWindowMoveEvents,u=i.state,c=u.brushingType,d=u.isBrushing,f=u.brushPageOffset,g=u.start;if(!(!l||!d)){var p=o.pageX-((f==null?void 0:f.pageX)||0),m=o.pageY-((f==null?void 0:f.pageY)||0);["left","right","top","bottom"].includes(c??"")&&i.updateBrush(function(v){var x=v.start,y=x.x,b=x.y,k=v.end,w=k.x,S=k.y;return an({},v,{isBrushing:!0,extent:an({},v.extent,i.getExtent({x:c==="left"?Math.min(Math.max(y+p,v.bounds.x0),v.bounds.x1):y,y:c==="top"?Math.min(Math.max(b+m,v.bounds.y0),v.bounds.y1):b},{x:c==="right"?Math.min(Math.max(w+p,v.bounds.x0),v.bounds.x1):w,y:c==="bottom"?Math.min(Math.max(S+m,v.bounds.y0),v.bounds.y1):S}))})}),c==="move"&&i.updateBrush(function(v){var x=v.start,y=x.x,b=x.y,k=v.end,w=k.x,S=k.y,N=p>0?Math.min(p,v.bounds.x1-w):Math.max(p,v.bounds.x0-y),E=m>0?Math.min(m,v.bounds.y1-S):Math.max(m,v.bounds.y0-b);return an({},v,{isBrushing:!0,extent:an({},v.extent,{x0:y+N,y0:b+E,x1:w+N,y1:S+E})})}),c==="select"&&i.updateBrush(function(v){var x=v.start,y=x.x,b=x.y,k={x:Math.min(Math.max(y+p,v.bounds.x0),v.bounds.x1),y:Math.min(Math.max(b+m,v.bounds.y0),v.bounds.y1)},w=i.getExtent(g,k),S=an({},v,{end:k,extent:w});return S})}},i.debouncedHandleWindowPointerMove=cB(i.handleWindowPointerMove,1),i.getExtent=function(o,l){var u=i.props,c=u.brushDirection,d=u.width,f=u.height,g=c==="vertical"?0:Math.min(o.x||0,l.x||0),p=c==="vertical"?d:Math.max(o.x||0,l.x||0),m=c==="horizontal"?0:Math.min(o.y||0,l.y||0),v=c==="horizontal"?f:Math.max(o.y||0,l.y||0);return{x0:g,x1:p,y0:m,y1:v}},i.handleDragStart=function(o){var l=i.props,u=l.onBrushStart,c=l.left,d=l.top,f=l.inheritedMargin,g=l.useWindowMoveEvents,p=f!=null&&f.left?f.left:0,m=f!=null&&f.top?f.top:0,v={x:(o.x||0)+o.dx-c-p,y:(o.y||0)+o.dy-d-m},x=an({},v);u&&u(v),i.updateBrush(function(y){return an({},y,{start:v,end:x,extent:{x0:-1,x1:-1,y0:-1,y1:-1},isBrushing:!0,brushingType:"select",brushPageOffset:g?gm(o.event):void 0})})},i.handleBrushStart=function(o){var l=i.props,u=l.onBrushStart,c=l.left,d=l.top,f=l.inheritedMargin;if(u){var g=f!=null&&f.left?f.left:0,p=f!=null&&f.top?f.top:0,m={x:(o.x||0)+o.dx-c-g,y:(o.y||0)+o.dy-d-p};u(m)}},i.handleDragMove=function(o){var l=i.props,u=l.left,c=l.top,d=l.inheritedMargin,f=l.useWindowMoveEvents;if(!(!o.isDragging||f)){var g=(d==null?void 0:d.left)||0,p=(d==null?void 0:d.top)||0,m={x:(o.x||0)+o.dx-u-g,y:(o.y||0)+o.dy-c-p};i.updateBrush(function(v){var x=v.start,y=i.getExtent(x,m);return an({},v,{end:m,extent:y})})}},i.handleDragEnd=function(){var o=i.props,l=o.onBrushEnd,u=o.resetOnEnd,c=o.useWindowMoveEvents;c||i.updateBrush(function(d){var f=d.extent,g=an({},d,{start:{x:f.x0,y:f.y0},end:{x:f.x1,y:f.y1},isBrushing:!1,brushingType:void 0,activeHandle:null});return l&&l(g),u&&(g=an({},g,i.getIdleState())),g})},i.getBrushWidth=function(){var o=i.state.extent,l=o.x0,u=o.x1;return Math.max(Math.max(l,u)-Math.min(l,u),0)},i.getBrushHeight=function(){var o=i.state.extent,l=o.y1,u=o.y0;return Math.max(Math.max(u,l)-Math.min(u,l),0)},i.handles=function(){var o=i.props.handleSize,l=i.state.extent,u=l.x0,c=l.x1,d=l.y0,f=l.y1,g=o/2,p=i.getBrushWidth(),m=i.getBrushHeight();return{top:{x:u-g,y:d-g,height:o,width:p+o},bottom:{x:u-g,y:f-g,height:o,width:p+o},right:{x:c-g,y:d-g,height:m+o,width:o},left:{x:u-g,y:d-g,height:m+o,width:o}}},i.corners=function(){var o=i.props.handleSize,l=i.state.extent,u=l.x0,c=l.x1,d=l.y0,f=l.y1,g=o/2,p=o,m=o;return{topLeft:{x:Math.min(u,c)-g,y:Math.min(d,f)-g,width:p,height:m},topRight:{x:Math.max(u,c)-g,y:Math.min(d,f)-g,width:p,height:m},bottomLeft:{x:Math.min(u,c)-g,y:Math.max(d,f)-g,width:p,height:m},bottomRight:{x:Math.max(u,c)-g,y:Math.max(d,f)-g,width:p,height:m}}},i.updateBrush=function(o){var l=i.props.onChange;i.setState(o,function(){l&&l(i.state)})},i.reset=function(){return i.updateBrush(function(){return i.getIdleState()})},i.handleBrushingTypeChange=function(o,l){i.updateBrush(function(u){var c=an({},u,{brushingType:o,isBrushing:o!==void 0});return(l||o===void 0)&&(c.brushPageOffset=l),c})};var a=r.initialBrushPosition,s=a?i.getExtent(a.start,a.end):{x0:-1,x1:-1,y0:-1,y1:-1};return i.state={start:{x:Math.max(0,s.x0),y:Math.max(0,s.y0)},end:{x:Math.max(0,s.x1),y:Math.max(0,s.y1)},extent:s,bounds:{x0:0,x1:i.props.width,y0:0,y1:i.props.height},isBrushing:!1,brushingType:void 0,activeHandle:null},i}var n=t.prototype;return n.componentDidUpdate=function(i){var a=this;(this.props.width!==i.width||this.props.height!==i.height)&&this.setState(function(s){var o=s.start,l=s.end,u=s.extent;if(!(u.x0===-1&&u.x1===-1&&u.y0===-1&&u.y1===-1)){var c=a.props.width/i.width,d=a.props.height/i.height;o={x:c*u.x0,y:d*u.y0},l={x:c*u.x1,y:d*u.y1},u=a.getExtent(o,l)}return{start:o,end:l,extent:u,bounds:{x0:0,x1:a.props.width,y0:0,y1:a.props.height}}})},n.componentDidMount=function(){this.props.useWindowMoveEvents&&(window.addEventListener("mouseup",this.handleWindowPointerUp),window.addEventListener("mousemove",this.debouncedHandleWindowPointerMove))},n.componentWillUnmount=function(){this.props.useWindowMoveEvents&&(window.removeEventListener("mouseup",this.handleWindowPointerUp),window.removeEventListener("mousemove",this.debouncedHandleWindowPointerMove))},n.render=function(){var i=this,a=this.state,s=a.start,o=a.end,l=this.props,u=l.top,c=l.left,d=l.width,f=l.height,g=l.onMouseLeave,p=l.onMouseUp,m=l.onMouseMove,v=l.onBrushEnd,x=l.onClick,y=l.resizeTriggerAreas,b=l.selectedBoxStyle,k=l.disableDraggingSelection,w=l.disableDraggingOverlay,S=l.clickSensitivity,N=l.useWindowMoveEvents,E=l.renderBrushHandle,T=this.state.brushingType,C=this.handles(),O=this.corners(),$=this.getBrushWidth(),M=this.getBrushHeight(),j=new Set(y);return _.createElement(ct,{className:"visx-brush",top:u,left:c},w?_.createElement(wm,{width:d,height:f,onClick:function(F){var B=i.mouseUpTime-i.mouseDownTime;x&&B<S&&x(F)},style:{cursor:"default"}}):_.createElement(Hc,{width:d,height:f,resetOnStart:!0,onDragStart:this.handleDragStart,onDragMove:this.handleDragMove,onDragEnd:this.handleDragEnd,isDragging:N?T==="select":void 0},function(P){var F=P.dragStart,B=P.isDragging,W=P.dragMove,q=P.dragEnd;return _.createElement(wm,{width:d,height:f,onDoubleClick:function(){return i.reset()},onClick:function(A){var U=i.mouseUpTime-i.mouseDownTime;x&&U<S&&x(A)},onPointerDown:function(A){i.mouseDownTime=Date.now(),F(A)},onPointerLeave:function(A){g&&g(A)},onPointerMove:function(A){!B&&m&&m(A),B&&W(A)},onPointerUp:function(A){i.mouseUpTime=Date.now(),p&&p(A),q(A)},style:{cursor:"crosshair"}})}),s&&o&&_.createElement(bm,{updateBrush:this.updateBrush,width:$,height:M,stageWidth:d,stageHeight:f,brush:this.state,disableDraggingSelection:k,onBrushEnd:v,onBrushStart:this.handleBrushStart,onMouseLeave:g,onMouseMove:m,onMouseUp:p,onMoveSelectionChange:this.handleBrushingTypeChange,onClick:x,selectedBoxStyle:b,isControlled:N,isDragInProgress:N?T==="move":void 0}),s&&o&&Object.keys(C).filter(function(P){return j.has(P)}).map(function(P){var F=C[P];return F&&_.createElement(PN,{key:"handle-"+P,type:P,handle:F,stageWidth:d,stageHeight:f,updateBrush:i.updateBrush,brush:i.state,onBrushStart:i.handleBrushStart,onBrushEnd:v,isControlled:N,isDragInProgress:N?T===P:void 0,onBrushHandleChange:i.handleBrushingTypeChange,renderBrushHandle:E})}),s&&o&&Object.keys(O).filter(function(P){return j.has(P)}).map(function(P){var F=O[P];return F&&_.createElement(ym,{key:"corner-"+P,type:P,brush:i.state,updateBrush:i.updateBrush,stageWidth:d,stageHeight:f,corner:F,onBrushEnd:v})}))},t}(_.Component);Sm.propTypes={brushDirection:V.oneOf(["horizontal","vertical","both"]),width:V.number.isRequired,height:V.number.isRequired,left:V.number.isRequired,top:V.number.isRequired,onChange:V.func,handleSize:V.number,resizeTriggerAreas:V.array,onBrushStart:V.func,onBrushEnd:V.func,onMouseLeave:V.func,onMouseUp:V.func,onMouseMove:V.func,onClick:V.func,clickSensitivity:V.number,disableDraggingSelection:V.bool,disableDraggingOverlay:V.bool,resetOnEnd:V.bool,useWindowMoveEvents:V.bool,renderBrushHandle:V.func},Sm.defaultProps={brushDirection:"both",inheritedMargin:{left:0,top:0,right:0,bottom:0},onChange:null,handleSize:4,resizeTriggerAreas:["left","right"],onBrushStart:null,onBrushEnd:null,onMouseLeave:null,onMouseUp:null,onMouseMove:null,onClick:null,disableDraggingSelection:!1,disableDraggingOverlay:!1,clickSensitivity:200,resetOnEnd:!1,initialBrushPosition:null,useWindowMoveEvents:!1,renderBrushHandles:null};function mB(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Nm(e,t)}function Nm(e,t){return Nm=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Nm(e,t)}var AN=2,LN="steelblue",Em=function(e){mB(t,e);function t(){for(var r,i=arguments.length,a=new Array(i),s=0;s<i;s++)a[s]=arguments[s];return r=e.call.apply(e,[this].concat(a))||this,r.handleChange=function(o){var l=r.props.onChange;if(l){var u=o.extent.x0;if(typeof u>"u"||u<0){l(null);return}var c=r.convertRangeToDomain(o);l(c)}},r.handleBrushStart=function(o){var l=r.props.onBrushStart;if(l){var u=o.x,c=o.y,d=r.props,f=d.xScale,g=d.yScale,p=qc(f,u),m=qc(g,c);l({x:"invert"in f&&typeof f.invert<"u"?p:f.domain()[p],y:"invert"in g&&typeof g.invert<"u"?m:g.domain()[m]})}},r.handleBrushEnd=function(o){var l=r.props.onBrushEnd;if(l){var u=o.extent.x0;if(typeof u>"u"||u<0){l(null);return}var c=r.convertRangeToDomain(o);l(c)}},r}var n=t.prototype;return n.convertRangeToDomain=function(i){var a=this.props,s=a.xScale,o=a.yScale,l=i.extent,u=l.x0,c=l.x1,d=l.y0,f=l.y1,g=$N(s,u||0,c||0,AN),p=$N(o,d||0,f||0,AN),m={x0:g.start||0,x1:g.end||0,xValues:g.values,y0:p.start||0,y1:p.end||0,yValues:p.values};return m},n.render=function(){var i=this.props,a=i.xScale,s=i.yScale,o=i.height,l=i.width,u=i.margin,c=i.brushDirection,d=i.initialBrushPosition,f=i.innerRef,g=i.resizeTriggerAreas,p=i.brushRegion,m=i.yAxisOrientation,v=i.xAxisOrientation,x=i.selectedBoxStyle,y=i.disableDraggingSelection,b=i.disableDraggingOverlay,k=i.resetOnEnd,w=i.onMouseLeave,S=i.onMouseMove,N=i.onClick,E=i.handleSize,T=i.useWindowMoveEvents,C=i.renderBrushHandle;if(!a||!s)return null;var O,$,M,j,P=u!=null&&u.left?u.left:0,F=u!=null&&u.top?u.top:0,B=u!=null&&u.right?u.right:0,W=u!=null&&u.bottom?u.bottom:0;return p==="chart"?(M=0,j=0,O=l,$=o):p==="yAxis"?(j=0,$=o,m==="right"?(M=l,O=B):(M=-P,O=P)):(M=0,O=l,v==="bottom"?(j=o,$=W):(j=-F,$=F)),_.createElement(Sm,{width:O,height:$,left:M,top:j,brushDirection:c,disableDraggingSelection:y,disableDraggingOverlay:b,handleSize:E,inheritedMargin:u,initialBrushPosition:d,ref:f,resetOnEnd:k,resizeTriggerAreas:g,selectedBoxStyle:x,onBrushEnd:this.handleBrushEnd,onBrushStart:this.handleBrushStart,onChange:this.handleChange,onClick:N,onMouseLeave:w,onMouseMove:S,useWindowMoveEvents:T,renderBrushHandle:C})},t}(_.Component);Em.propTypes={height:V.number,width:V.number,onChange:V.func,onBrushEnd:V.func,brushDirection:V.oneOf(["vertical","horizontal","both"]),resizeTriggerAreas:V.array,brushRegion:V.oneOf(["xAxis","yAxis","chart"]),yAxisOrientation:V.oneOf(["left","right"]),xAxisOrientation:V.oneOf(["top","bottom"]),disableDraggingSelection:V.bool,disableDraggingOverlay:V.bool,resetOnEnd:V.bool,handleSize:V.number,useWindowMoveEvents:V.bool,renderBrushHandle:V.func},Em.defaultProps={xScale:null,yScale:null,onChange:null,height:0,width:0,selectedBoxStyle:{fill:LN,fillOpacity:.2,stroke:LN,strokeWidth:1,strokeOpacity:.8},margin:{top:0,left:0,right:0,bottom:0},handleSize:4,brushDirection:"horizontal",initialBrushPosition:null,resizeTriggerAreas:["left","right"],brushRegion:"chart",yAxisOrientation:"right",xAxisOrientation:"bottom",onBrushStart:null,onBrushEnd:null,disableDraggingSelection:!1,resetOnEnd:!1,onMouseMove:null,onMouseLeave:null,onClick:null,useWindowMoveEvents:!1,renderBrushHandles:null};var vB=["className","top","left","data","binWidth","binHeight","x0","gap","xScale","yScale","colorScale","opacityScale","bins","count","children"];function Tm(){return Tm=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Tm.apply(this,arguments)}function yB(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function DN(e){var t=e.className,n=e.top,r=e.left,i=e.data,a=i===void 0?[]:i,s=e.binWidth,o=s===void 0?6:s,l=e.binHeight,u=l===void 0?6:l,c=e.x0,d=c===void 0?0:c,f=e.gap,g=f===void 0?1:f,p=e.xScale,m=e.yScale,v=e.colorScale,x=v===void 0?function(){}:v,y=e.opacityScale,b=y===void 0?function(){return 1}:y,k=e.bins,w=k===void 0?function(M){return M==null?void 0:M.bins}:k,S=e.count,N=S===void 0?function(M){return M==null?void 0:M.count}:S,E=e.children,T=yB(e,vB),C=o-g,O=u-g,$=a.map(function(M,j){var P=p(j);return w(M).map(function(F,B){var W=N(F);return{bin:F,row:B,column:j,datum:M,width:C,height:O,gap:g,count:W,x:P+d,y:m(B)+g,color:x(W),opacity:b(W)}})});return E?_.createElement(_.Fragment,null,E($)):_.createElement(ct,{className:"visx-heatmap-rects",top:n,left:r},$.map(function(M){return M.map(function(j){return _.createElement("rect",Tm({key:"heatmap-tile-rect-"+j.row+"-"+j.column,className:$e("visx-heatmap-rect",t),width:j.width,height:j.height,x:j.x,y:j.y,fill:j.color,fillOpacity:j.opacity},T))})}))}DN.propTypes={data:V.array,left:V.number,top:V.number,binWidth:V.number,binHeight:V.number,x0:V.number,gap:V.number,xScale:V.func.isRequired,yScale:V.func.isRequired,bins:V.func,count:V.func,className:V.string,children:V.func};function IN(e,t){let n;return(...r)=>{window.clearTimeout(n),n=window.setTimeout(()=>e(...r),t)}}function xB({debounce:e,scroll:t,polyfill:n,offsetSize:r}={debounce:0,scroll:!1,offsetSize:!1}){const i=n||(typeof window>"u"?class{}:window.ResizeObserver);if(!i)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[a,s]=_.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),o=_.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:a,orientationHandler:null}),l=e?typeof e=="number"?e:e.scroll:null,u=e?typeof e=="number"?e:e.resize:null,c=_.useRef(!1);_.useEffect(()=>(c.current=!0,()=>void(c.current=!1)));const[d,f,g]=_.useMemo(()=>{const x=()=>{if(!o.current.element)return;const{left:y,top:b,width:k,height:w,bottom:S,right:N,x:E,y:T}=o.current.element.getBoundingClientRect(),C={left:y,top:b,width:k,height:w,bottom:S,right:N,x:E,y:T};o.current.element instanceof HTMLElement&&r&&(C.height=o.current.element.offsetHeight,C.width=o.current.element.offsetWidth),Object.freeze(C),c.current&&!kB(o.current.lastBounds,C)&&s(o.current.lastBounds=C)};return[x,u?IN(x,u):x,l?IN(x,l):x]},[s,r,l,u]);function p(){o.current.scrollContainers&&(o.current.scrollContainers.forEach(x=>x.removeEventListener("scroll",g,!0)),o.current.scrollContainers=null),o.current.resizeObserver&&(o.current.resizeObserver.disconnect(),o.current.resizeObserver=null),o.current.orientationHandler&&("orientation"in screen&&"removeEventListener"in screen.orientation?screen.orientation.removeEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.removeEventListener("orientationchange",o.current.orientationHandler))}function m(){o.current.element&&(o.current.resizeObserver=new i(g),o.current.resizeObserver.observe(o.current.element),t&&o.current.scrollContainers&&o.current.scrollContainers.forEach(x=>x.addEventListener("scroll",g,{capture:!0,passive:!0})),o.current.orientationHandler=()=>{g()},"orientation"in screen&&"addEventListener"in screen.orientation?screen.orientation.addEventListener("change",o.current.orientationHandler):"onorientationchange"in window&&window.addEventListener("orientationchange",o.current.orientationHandler))}const v=x=>{!x||x===o.current.element||(p(),o.current.element=x,o.current.scrollContainers=FN(x),m())};return _B(g,!!t),bB(f),_.useEffect(()=>{p(),m()},[t,g,f]),_.useEffect(()=>p,[]),[v,a,d]}function bB(e){_.useEffect(()=>{const t=e;return window.addEventListener("resize",t),()=>void window.removeEventListener("resize",t)},[e])}function _B(e,t){_.useEffect(()=>{if(t){const n=e;return window.addEventListener("scroll",n,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",n,!0)}},[e,t])}function FN(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some(a=>a==="auto"||a==="scroll")&&t.push(e),[...t,...FN(e.parentElement)]}const wB=["x","y","top","bottom","left","right","width","height"],kB=(e,t)=>wB.every(n=>e[n]===t[n]);var Or=_.createContext({});function Cm(e){var t,n=e;return n&&"bandwidth"in n&&(t=n==null?void 0:n.bandwidth())!=null?t:0}function pn(e){return e!=null&&typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e)}var Mm=dl(),Ee=e=>cl(e,Mm),jm=dl();Ee.write=e=>cl(e,jm);var Vc=dl();Ee.onStart=e=>cl(e,Vc);var Om=dl();Ee.onFrame=e=>cl(e,Om);var $m=dl();Ee.onFinish=e=>cl(e,$m);var Os=[];Ee.setTimeout=(e,t)=>{const n=Ee.now()+t,r=()=>{const a=Os.findIndex(s=>s.cancel==r);~a&&Os.splice(a,1),ji-=~a?1:0},i={time:n,handler:e,cancel:r};return Os.splice(zN(n),0,i),ji+=1,RN(),i};var zN=e=>~(~Os.findIndex(t=>t.time>e)||~Os.length);Ee.cancel=e=>{Vc.delete(e),Om.delete(e),$m.delete(e),Mm.delete(e),jm.delete(e)},Ee.sync=e=>{Am=!0,Ee.batchedUpdates(e),Am=!1},Ee.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...i){t=i,Ee.onStart(n)}return r.handler=e,r.cancel=()=>{Vc.delete(n),t=null},r};var Pm=typeof window<"u"?window.requestAnimationFrame:()=>{};Ee.use=e=>Pm=e,Ee.now=typeof performance<"u"?()=>performance.now():Date.now,Ee.batchedUpdates=e=>e(),Ee.catch=console.error,Ee.frameLoop="always",Ee.advance=()=>{Ee.frameLoop!=="demand"?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):WN()};var Mi=-1,ji=0,Am=!1;function cl(e,t){Am?(t.delete(e),e(0)):(t.add(e),RN())}function RN(){Mi<0&&(Mi=0,Ee.frameLoop!=="demand"&&Pm(BN))}function SB(){Mi=-1}function BN(){~Mi&&(Pm(BN),Ee.batchedUpdates(WN))}function WN(){const e=Mi;Mi=Ee.now();const t=zN(Mi);if(t&&(UN(Os.splice(0,t),n=>n.handler()),ji-=t),!ji){SB();return}Vc.flush(),Mm.flush(e?Math.min(64,Mi-e):16.667),Om.flush(),jm.flush(),$m.flush()}function dl(){let e=new Set,t=e;return{add(n){ji+=t==e&&!e.has(n)?1:0,e.add(n)},delete(n){return ji-=t==e&&e.has(n)?1:0,e.delete(n)},flush(n){t.size&&(e=new Set,ji-=t.size,UN(t,r=>r(n)&&e.add(r)),ji+=e.size,t=e)}}}function UN(e,t){e.forEach(n=>{try{t(n)}catch(r){Ee.catch(r)}})}var NB=Object.defineProperty,EB=(e,t)=>{for(var n in t)NB(e,n,{get:t[n],enumerable:!0})},qn={};EB(qn,{assign:()=>VN,colors:()=>Oi,createStringInterpolator:()=>Im,skipAnimation:()=>qN,to:()=>HN,willAdvance:()=>Fm});function Lm(){}var TB=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),se={arr:Array.isArray,obj:e=>!!e&&e.constructor.name==="Object",fun:e=>typeof e=="function",str:e=>typeof e=="string",num:e=>typeof e=="number",und:e=>e===void 0};function ii(e,t){if(se.arr(e)){if(!se.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}var _e=(e,t)=>e.forEach(t);function $r(e,t,n){if(se.arr(e)){for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);return}for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}var sn=e=>se.und(e)?[]:se.arr(e)?e:[e];function fl(e,t){if(e.size){const n=Array.from(e);e.clear(),_e(n,t)}}var hl=(e,...t)=>fl(e,n=>n(...t)),Dm=()=>typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Im,HN,Oi=null,qN=!1,Fm=Lm,VN=e=>{e.to&&(HN=e.to),e.now&&(Ee.now=e.now),e.colors!==void 0&&(Oi=e.colors),e.skipAnimation!=null&&(qN=e.skipAnimation),e.createStringInterpolator&&(Im=e.createStringInterpolator),e.requestAnimationFrame&&Ee.use(e.requestAnimationFrame),e.batchedUpdates&&(Ee.batchedUpdates=e.batchedUpdates),e.willAdvance&&(Fm=e.willAdvance),e.frameLoop&&(Ee.frameLoop=e.frameLoop)},pl=new Set,Vn=[],zm=[],Kc=0,gl={get idle(){return!pl.size&&!Vn.length},start(e){Kc>e.priority?(pl.add(e),Ee.onStart(CB)):(KN(e),Ee(Rm))},advance:Rm,sort(e){if(Kc)Ee.onFrame(()=>gl.sort(e));else{const t=Vn.indexOf(e);~t&&(Vn.splice(t,1),YN(e))}},clear(){Vn=[],pl.clear()}};function CB(){pl.forEach(KN),pl.clear(),Ee(Rm)}function KN(e){Vn.includes(e)||YN(e)}function YN(e){Vn.splice(MB(Vn,t=>t.priority>e.priority),0,e)}function Rm(e){const t=zm;for(let n=0;n<Vn.length;n++){const r=Vn[n];Kc=r.priority,r.idle||(Fm(r),r.advance(e),r.idle||t.push(r))}return Kc=0,zm=Vn,zm.length=0,Vn=t,Vn.length>0}function MB(e,t){const n=e.findIndex(t);return n<0?e.length:n}var jB=(e,t,n)=>Math.min(Math.max(n,e),t),OB={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},cr="[-+]?\\d*\\.?\\d+",Yc=cr+"%";function Gc(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}var $B=new RegExp("rgb"+Gc(cr,cr,cr)),PB=new RegExp("rgba"+Gc(cr,cr,cr,cr)),AB=new RegExp("hsl"+Gc(cr,Yc,Yc)),LB=new RegExp("hsla"+Gc(cr,Yc,Yc,cr)),DB=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,IB=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,FB=/^#([0-9a-fA-F]{6})$/,zB=/^#([0-9a-fA-F]{8})$/;function RB(e){let t;return typeof e=="number"?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=FB.exec(e))?parseInt(t[1]+"ff",16)>>>0:Oi&&Oi[e]!==void 0?Oi[e]:(t=$B.exec(e))?($s(t[1])<<24|$s(t[2])<<16|$s(t[3])<<8|255)>>>0:(t=PB.exec(e))?($s(t[1])<<24|$s(t[2])<<16|$s(t[3])<<8|JN(t[4]))>>>0:(t=DB.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=zB.exec(e))?parseInt(t[1],16)>>>0:(t=IB.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=AB.exec(e))?(GN(XN(t[1]),Xc(t[2]),Xc(t[3]))|255)>>>0:(t=LB.exec(e))?(GN(XN(t[1]),Xc(t[2]),Xc(t[3]))|JN(t[4]))>>>0:null}function Bm(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function GN(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=Bm(i,r,e+1/3),s=Bm(i,r,e),o=Bm(i,r,e-1/3);return Math.round(a*255)<<24|Math.round(s*255)<<16|Math.round(o*255)<<8}function $s(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function XN(e){return(parseFloat(e)%360+360)%360/360}function JN(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(t*255)}function Xc(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function ZN(e){let t=RB(e);if(t===null)return e;t=t||0;const n=(t&4278190080)>>>24,r=(t&16711680)>>>16,i=(t&65280)>>>8,a=(t&255)/255;return`rgba(${n}, ${r}, ${i}, ${a})`}var Ps=(e,t,n)=>{if(se.fun(e))return e;if(se.arr(e))return Ps({range:e,output:t,extrapolate:n});if(se.str(e.output[0]))return Im(e);const r=e,i=r.output,a=r.range||[0,1],s=r.extrapolateLeft||r.extrapolate||"extend",o=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(u=>u);return u=>{const c=WB(u,a);return BB(u,a[c],a[c+1],i[c],i[c+1],l,s,o,r.map)}};function BB(e,t,n,r,i,a,s,o,l){let u=l?l(e):e;if(u<t){if(s==="identity")return u;s==="clamp"&&(u=t)}if(u>n){if(o==="identity")return u;o==="clamp"&&(u=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?u=-u:n===1/0?u=u-t:u=(u-t)/(n-t),u=a(u),r===-1/0?u=-u:i===1/0?u=u+r:u=u*(i-r)+r,u)}function WB(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}var UB=(e,t="end")=>n=>{n=t==="end"?Math.min(n,.999):Math.max(n,.001);const r=n*e,i=t==="end"?Math.floor(r):Math.ceil(r);return jB(0,1,i/e)},Jc=1.70158,Zc=Jc*1.525,QN=Jc+1,eE=2*Math.PI/3,tE=2*Math.PI/4.5,Qc=e=>e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375,nE={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>e===0?0:Math.pow(2,10*e-10),easeOutExpo:e=>e===1?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>e===0?0:e===1?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>QN*e*e*e-Jc*e*e,easeOutBack:e=>1+QN*Math.pow(e-1,3)+Jc*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*((Zc+1)*2*e-Zc)/2:(Math.pow(2*e-2,2)*((Zc+1)*(e*2-2)+Zc)+2)/2,easeInElastic:e=>e===0?0:e===1?1:-Math.pow(2,10*e-10)*Math.sin((e*10-10.75)*eE),easeOutElastic:e=>e===0?0:e===1?1:Math.pow(2,-10*e)*Math.sin((e*10-.75)*eE)+1,easeInOutElastic:e=>e===0?0:e===1?1:e<.5?-(Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*tE))/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*tE)/2+1,easeInBounce:e=>1-Qc(1-e),easeOutBounce:Qc,easeInOutBounce:e=>e<.5?(1-Qc(1-2*e))/2:(1+Qc(2*e-1))/2,steps:UB},ml=Symbol.for("FluidValue.get"),As=Symbol.for("FluidValue.observers"),Kn=e=>!!(e&&e[ml]),gn=e=>e&&e[ml]?e[ml]():e,rE=e=>e[As]||null;function HB(e,t){e.eventObserved?e.eventObserved(t):e(t)}function vl(e,t){const n=e[As];n&&n.forEach(r=>{HB(r,t)})}var iE=class{constructor(e){if(!e&&!(e=this.get))throw Error("Unknown getter");qB(this,e)}},qB=(e,t)=>aE(e,ml,t);function Ls(e,t){if(e[ml]){let n=e[As];n||aE(e,As,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function yl(e,t){const n=e[As];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[As]=null,e.observerRemoved&&e.observerRemoved(r,t)}}var aE=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ed=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,VB=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,sE=new RegExp(`(${ed.source})(%|[a-z]+)`,"i"),KB=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,td=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,oE=e=>{const[t,n]=YB(e);if(!t||Dm())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){const i=window.getComputedStyle(document.documentElement).getPropertyValue(n);return i||e}else{if(n&&td.test(n))return oE(n);if(n)return n}return e},YB=e=>{const t=td.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]},Wm,GB=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,lE=e=>{Wm||(Wm=Oi?new RegExp(`(${Object.keys(Oi).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map(a=>gn(a).replace(td,oE).replace(VB,ZN).replace(Wm,ZN)),n=t.map(a=>a.match(ed).map(Number)),i=n[0].map((a,s)=>n.map(o=>{if(!(s in o))throw Error('The arity of each "output" value must be equal');return o[s]})).map(a=>Ps({...e,output:a}));return a=>{var l;const s=!sE.test(t[0])&&((l=t.find(u=>sE.test(u)))==null?void 0:l.replace(ed,""));let o=0;return t[0].replace(ed,()=>`${i[o++](a)}${s||""}`).replace(KB,GB)}},Um="react-spring: ",uE=e=>{const t=e;let n=!1;if(typeof t!="function")throw new TypeError(`${Um}once requires a function parameter`);return(...r)=>{n||(t(...r),n=!0)}},XB=uE(console.warn);function cE(){XB(`${Um}The "interpolate" function is deprecated in v9 (use "to" instead)`)}var JB=uE(console.warn);function ZB(){JB(`${Um}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`)}function nd(e){return se.str(e)&&(e[0]=="#"||/\d/.test(e)||!Dm()&&td.test(e)||e in(Oi||{}))}var Ds,rd=new WeakMap,QB=e=>e.forEach(({target:t,contentRect:n})=>{var r;return(r=rd.get(t))==null?void 0:r.forEach(i=>i(n))});function e6(e,t){Ds||typeof ResizeObserver<"u"&&(Ds=new ResizeObserver(QB));let n=rd.get(t);return n||(n=new Set,rd.set(t,n)),n.add(e),Ds&&Ds.observe(t),()=>{const r=rd.get(t);r&&(r.delete(e),!r.size&&Ds&&Ds.unobserve(t))}}var id=new Set,xl,t6=()=>{const e=()=>{id.forEach(t=>t({width:window.innerWidth,height:window.innerHeight}))};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},n6=e=>(id.add(e),xl||(xl=t6()),()=>{id.delete(e),!id.size&&xl&&(xl(),xl=void 0)}),dE=(e,{container:t=document.documentElement}={})=>t===document.documentElement?n6(e):e6(e,t),r6=(e,t,n)=>t-e===0?1:(n-e)/(t-e),i6={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}},a6=class{constructor(e,t){this.createAxis=()=>({current:0,progress:0,scrollLength:0}),this.updateAxis=n=>{const r=this.info[n],{length:i,position:a}=i6[n];r.current=this.container[`scroll${a}`],r.scrollLength=this.container[`scroll${i}`]-this.container[`client${i}`],r.progress=r6(0,r.scrollLength,r.current)},this.update=()=>{this.updateAxis("x"),this.updateAxis("y")},this.sendEvent=()=>{this.callback(this.info)},this.advance=()=>{this.update(),this.sendEvent()},this.callback=e,this.container=t,this.info={time:0,x:this.createAxis(),y:this.createAxis()}}},bl=new WeakMap,fE=new WeakMap,Hm=new WeakMap,hE=e=>e===document.documentElement?window:e,s6=(e,{container:t=document.documentElement}={})=>{let n=Hm.get(t);n||(n=new Set,Hm.set(t,n));const r=new a6(e,t);if(n.add(r),!bl.has(t)){const a=()=>(n==null||n.forEach(o=>o.advance()),!0);bl.set(t,a);const s=hE(t);window.addEventListener("resize",a,{passive:!0}),t!==document.documentElement&&fE.set(t,dE(a,{container:t})),s.addEventListener("scroll",a,{passive:!0})}const i=bl.get(t);return Ee(i),()=>{var o;Ee.cancel(i);const a=Hm.get(t);if(!a||(a.delete(r),a.size))return;const s=bl.get(t);bl.delete(t),s&&(hE(t).removeEventListener("scroll",s),window.removeEventListener("resize",s),(o=fE.get(t))==null||o())}};function o6(e){const t=_.useRef(null);return t.current===null&&(t.current=e()),t.current}var mn=Dm()?_.useEffect:_.useLayoutEffect,l6=()=>{const e=_.useRef(!1);return mn(()=>(e.current=!0,()=>{e.current=!1}),[]),e};function qm(){const e=_.useState()[1],t=l6();return()=>{t.current&&e(Math.random())}}function u6(e,t){const[n]=_.useState(()=>({inputs:t,result:e()})),r=_.useRef(),i=r.current;let a=i;return a?t&&a.inputs&&c6(t,a.inputs)||(a={inputs:t,result:e()}):a=n,_.useEffect(()=>{r.current=a,i==n&&(n.inputs=n.result=void 0)},[a]),a.result}function c6(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var ad=e=>_.useEffect(e,d6),d6=[];function Vm(e){const t=_.useRef();return _.useEffect(()=>{t.current=e}),t.current}var f6=()=>{const[e,t]=_.useState(null);return mn(()=>{const n=window.matchMedia("(prefers-reduced-motion)"),r=i=>{t(i.matches),VN({skipAnimation:i.matches})};return r(n),n.addEventListener?n.addEventListener("change",r):n.addListener(r),()=>{n.removeEventListener?n.removeEventListener("change",r):n.removeListener(r)}},[]),e},_l=Symbol.for("Animated:node"),h6=e=>!!e&&e[_l]===e,Pr=e=>e&&e[_l],Km=(e,t)=>TB(e,_l,t),sd=e=>e&&e[_l]&&e[_l].getPayload(),pE=class{constructor(){Km(this,this)}getPayload(){return this.payload||[]}},wl=class extends pE{constructor(e){super(),this._value=e,this.done=!0,this.durationProgress=0,se.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new wl(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return se.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value===e?!1:(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,se.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}},kl=class extends wl{constructor(e){super(0),this._string=null,this._toString=Ps({output:[e,e]})}static create(e){return new kl(e)}getValue(){const e=this._string;return e??(this._string=this._toString(this._value))}setValue(e){if(se.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else if(super.setValue(e))this._string=null;else return!1;return!0}reset(e){e&&(this._toString=Ps({output:[this.getValue(),e]})),this._value=0,super.reset()}},od={dependencies:null},ld=class extends pE{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return $r(this.source,(n,r)=>{h6(n)?t[r]=n.getValue(e):Kn(n)?t[r]=gn(n):e||(t[r]=n)}),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&_e(this.payload,e=>e.reset())}_makePayload(e){if(e){const t=new Set;return $r(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){od.dependencies&&Kn(e)&&od.dependencies.add(e);const t=sd(e);t&&_e(t,n=>this.add(n))}},gE=class extends ld{constructor(e){super(e)}static create(e){return new gE(e)}getValue(){return this.source.map(e=>e.getValue())}setValue(e){const t=this.getPayload();return e.length==t.length?t.map((n,r)=>n.setValue(e[r])).some(Boolean):(super.setValue(e.map(p6)),!0)}};function p6(e){return(nd(e)?kl:wl).create(e)}function Ym(e){const t=Pr(e);return t?t.constructor:se.arr(e)?gE:nd(e)?kl:wl}var mE=(e,t)=>{const n=!se.fun(e)||e.prototype&&e.prototype.isReactComponent;return _.forwardRef((r,i)=>{const a=_.useRef(null),s=n&&_.useCallback(p=>{a.current=v6(i,p)},[i]),[o,l]=m6(r,t),u=qm(),c=()=>{const p=a.current;if(n&&!p)return;(p?t.applyAnimatedValues(p,o.getValue(!0)):!1)===!1&&u()},d=new g6(c,l),f=_.useRef();mn(()=>(f.current=d,_e(l,p=>Ls(p,d)),()=>{f.current&&(_e(f.current.deps,p=>yl(p,f.current)),Ee.cancel(f.current.update))})),_.useEffect(c,[]),ad(()=>()=>{const p=f.current;_e(p.deps,m=>yl(m,p))});const g=t.getComponentProps(o.getValue());return $a.createElement(e,{...g,ref:s})})},g6=class{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){e.type=="change"&&Ee.write(this.update)}};function m6(e,t){const n=new Set;return od.dependencies=n,e.style&&(e={...e,style:t.createAnimatedStyle(e.style)}),e=new ld(e),od.dependencies=null,[e,n]}function v6(e,t){return e&&(se.fun(e)?e(t):e.current=t),t}var vE=Symbol.for("AnimatedComponent"),y6=(e,{applyAnimatedValues:t=()=>!1,createAnimatedStyle:n=i=>new ld(i),getComponentProps:r=i=>i}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=s=>{const o=yE(s)||"Anonymous";return se.str(s)?s=a[s]||(a[s]=mE(s,i)):s=s[vE]||(s[vE]=mE(s,i)),s.displayName=`Animated(${o})`,s};return $r(e,(s,o)=>{se.arr(e)&&(o=yE(s)),a[o]=a(s)}),{animated:a}},yE=e=>se.str(e)?e:e&&se.str(e.displayName)?e.displayName:se.fun(e)&&e.name||null,x6=class{};function on(e,...t){return se.fun(e)?e(...t):e}var Sl=(e,t)=>e===!0||!!(t&&e&&(se.fun(e)?e(t):sn(e).includes(t))),xE=(e,t)=>se.obj(e)?t&&e[t]:e,bE=(e,t)=>e.default===!0?e[t]:e.default?e.default[t]:void 0,b6=e=>e,ud=(e,t=b6)=>{let n=_6;e.default&&e.default!==!0&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const a=t(e[i],i);se.und(a)||(r[i]=a)}return r},_6=["config","onProps","onStart","onChange","onPause","onResume","onRest"],w6={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function k6(e){const t={};let n=0;if($r(e,(r,i)=>{w6[i]||(t[i]=r,n++)}),n)return t}function cd(e){const t=k6(e);if(t){const n={to:t};return $r(e,(r,i)=>i in t||(n[i]=r)),n}return{...e}}function Nl(e){return e=gn(e),se.arr(e)?e.map(Nl):nd(e)?qn.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function _E(e){for(const t in e)return!0;return!1}function Gm(e){return se.fun(e)||se.arr(e)&&se.obj(e[0])}function Xm(e,t){var n;(n=e.ref)==null||n.delete(e),t==null||t.delete(e)}function Jm(e,t){var n;t&&e.ref!==t&&((n=e.ref)==null||n.delete(e),t.add(e),e.ref=t)}function S6(e,t,n=1e3){mn(()=>{if(t){let r=0;_e(e,(i,a)=>{const s=i.current;if(s.length){let o=n*t[a];isNaN(o)?o=r:r=o,_e(s,l=>{_e(l.queue,u=>{const c=u.delay;u.delay=d=>o+on(c||0,d)})}),i.start()}})}else{let r=Promise.resolve();_e(e,i=>{const a=i.current;if(a.length){const s=a.map(o=>{const l=o.queue;return o.queue=[],l});r=r.then(()=>(_e(a,(o,l)=>_e(s[l]||[],u=>o.queue.push(u))),Promise.all(i.start())))}})}})}var wE={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}},Zm={...wE.default,mass:1,damping:1,easing:nE.linear,clamp:!1},N6=class{constructor(){this.velocity=0,Object.assign(this,Zm)}};function E6(e,t,n){n&&(n={...n},kE(n,t),t={...n,...t}),kE(e,t),Object.assign(e,t);for(const s in Zm)e[s]==null&&(e[s]=Zm[s]);let{frequency:r,damping:i}=e;const{mass:a}=e;return se.und(r)||(r<.01&&(r=.01),i<0&&(i=0),e.tension=Math.pow(2*Math.PI/r,2)*a,e.friction=4*Math.PI*i*a/r),e}function kE(e,t){if(!se.und(t.decay))e.duration=void 0;else{const n=!se.und(t.tension)||!se.und(t.friction);(n||!se.und(t.frequency)||!se.und(t.damping)||!se.und(t.mass))&&(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}}var SE=[],T6=class{constructor(){this.changed=!1,this.values=SE,this.toValues=null,this.fromValues=SE,this.config=new N6,this.immediate=!1}};function NE(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise((s,o)=>{let l,u,c=Sl(n.cancel??(r==null?void 0:r.cancel),t);if(c)g();else{se.und(n.pause)||(i.paused=Sl(n.pause,t));let p=r==null?void 0:r.pause;p!==!0&&(p=i.paused||Sl(p,t)),l=on(n.delay||0,t),p?(i.resumeQueue.add(f),a.pause()):(a.resume(),f())}function d(){i.resumeQueue.add(f),i.timeouts.delete(u),u.cancel(),l=u.time-Ee.now()}function f(){l>0&&!qn.skipAnimation?(i.delayed=!0,u=Ee.setTimeout(g,l),i.pauseQueue.add(d),i.timeouts.add(u)):g()}function g(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(d),i.timeouts.delete(u),e<=(i.cancelId||0)&&(c=!0);try{a.start({...n,callId:e,cancel:c},s)}catch(p){o(p)}}})}var Qm=(e,t)=>t.length==1?t[0]:t.some(n=>n.cancelled)?Is(e.get()):t.every(n=>n.noop)?EE(e.get()):dr(e.get(),t.every(n=>n.finished)),EE=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),dr=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),Is=e=>({value:e,cancelled:!0,finished:!1});function TE(e,t,n,r){const{callId:i,parentId:a,onRest:s}=t,{asyncTo:o,promise:l}=n;return!a&&e===o&&!t.reset?l:n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const u=ud(t,(v,x)=>x==="onRest"?void 0:v);let c,d;const f=new Promise((v,x)=>(c=v,d=x)),g=v=>{const x=i<=(n.cancelId||0)&&Is(r)||i!==n.asyncId&&dr(r,!1);if(x)throw v.result=x,d(v),v},p=(v,x)=>{const y=new ev,b=new CE;return(async()=>{if(qn.skipAnimation)throw El(n),b.result=dr(r,!1),d(b),b;g(y);const k=se.obj(v)?{...v}:{...x,to:v};k.parentId=i,$r(u,(S,N)=>{se.und(k[N])&&(k[N]=S)});const w=await r.start(k);return g(y),n.paused&&await new Promise(S=>{n.resumeQueue.add(S)}),w})()};let m;if(qn.skipAnimation)return El(n),dr(r,!1);try{let v;se.arr(e)?v=(async x=>{for(const y of x)await p(y)})(e):v=Promise.resolve(e(p,r.stop.bind(r))),await Promise.all([v.then(c),f]),m=dr(r.get(),!0,!1)}catch(v){if(v instanceof ev)m=v.result;else if(v instanceof CE)m=v.result;else throw v}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?o:void 0,n.promise=a?l:void 0)}return se.fun(s)&&Ee.batchedUpdates(()=>{s(m,r,r.item)}),m})()}function El(e,t){fl(e.timeouts,n=>n.cancel()),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}var ev=class extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise.")}},CE=class extends Error{constructor(){super("SkipAnimationSignal")}},tv=e=>e instanceof dd,C6=1,dd=class extends iE{constructor(){super(...arguments),this.id=C6++,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Pr(this);return e&&e.getValue()}to(...e){return qn.to(this,e)}interpolate(...e){return cE(),qn.to(this,e)}toJSON(){return this.get()}observerAdded(e){e==1&&this._attach()}observerRemoved(e){e==0&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){vl(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||gl.sort(this),vl(this,{type:"priority",parent:this,priority:e})}},Ta=Symbol.for("SpringPhase"),ME=1,nv=2,rv=4,iv=e=>(e[Ta]&ME)>0,$i=e=>(e[Ta]&nv)>0,Tl=e=>(e[Ta]&rv)>0,jE=(e,t)=>t?e[Ta]|=nv|ME:e[Ta]&=~nv,OE=(e,t)=>t?e[Ta]|=rv:e[Ta]&=~rv,av=class extends dd{constructor(e,t){if(super(),this.animation=new T6,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!se.und(e)||!se.und(t)){const n=se.obj(e)?{...e}:{...t,from:e};se.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!($i(this)||this._state.asyncTo)||Tl(this)}get goal(){return gn(this.animation.to)}get velocity(){const e=Pr(this);return e instanceof wl?e.lastVelocity||0:e.getPayload().map(t=>t.lastVelocity||0)}get hasAnimated(){return iv(this)}get isAnimating(){return $i(this)}get isPaused(){return Tl(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{toValues:i}=r;const{config:a}=r,s=sd(r.to);!s&&Kn(r.to)&&(i=sn(gn(r.to))),r.values.forEach((u,c)=>{if(u.done)return;const d=u.constructor==kl?1:s?s[c].lastPosition:i[c];let f=r.immediate,g=d;if(!f){if(g=u.lastPosition,a.tension<=0){u.done=!0;return}let p=u.elapsedTime+=e;const m=r.fromValues[c],v=u.v0!=null?u.v0:u.v0=se.arr(a.velocity)?a.velocity[c]:a.velocity;let x;const y=a.precision||(m==d?.005:Math.min(1,Math.abs(d-m)*.001));if(se.und(a.duration))if(a.decay){const b=a.decay===!0?.998:a.decay,k=Math.exp(-(1-b)*p);g=m+v/(1-b)*(1-k),f=Math.abs(u.lastPosition-g)<=y,x=v*k}else{x=u.lastVelocity==null?v:u.lastVelocity;const b=a.restVelocity||y/10,k=a.clamp?0:a.bounce,w=!se.und(k),S=m==d?u.v0>0:m<d;let N,E=!1;const T=1,C=Math.ceil(e/T);for(let O=0;O<C&&(N=Math.abs(x)>b,!(!N&&(f=Math.abs(d-g)<=y,f)));++O){w&&(E=g==d||g>d==S,E&&(x=-x*k,g=d));const $=-a.tension*1e-6*(g-d),M=-a.friction*.001*x,j=($+M)/a.mass;x=x+j*T,g=g+x*T}}else{let b=1;a.duration>0&&(this._memoizedDuration!==a.duration&&(this._memoizedDuration=a.duration,u.durationProgress>0&&(u.elapsedTime=a.duration*u.durationProgress,p=u.elapsedTime+=e)),b=(a.progress||0)+p/this._memoizedDuration,b=b>1?1:b<0?0:b,u.durationProgress=b),g=m+a.easing(b)*(d-m),x=(g-u.lastPosition)/e,f=b==1}u.lastVelocity=x,Number.isNaN(g)&&(console.warn("Got NaN while animating:",this),f=!0)}s&&!s[c].done&&(f=!1),f?u.done=!0:t=!1,u.setValue(g,a.round)&&(n=!0)});const o=Pr(this),l=o.getValue();if(t){const u=gn(r.to);(l!==u||n)&&!a.decay?(o.setValue(u),this._onChange(u)):n&&a.decay&&this._onChange(l),this._stop()}else n&&this._onChange(l)}set(e){return Ee.batchedUpdates(()=>{this._stop(),this._focus(e),this._set(e)}),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if($i(this)){const{to:e,config:t}=this.animation;Ee.batchedUpdates(()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()})}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return se.und(e)?(n=this.queue||[],this.queue=[]):n=[se.obj(e)?e:{...t,to:e}],Promise.all(n.map(r=>this._update(r))).then(r=>Qm(this,r))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),El(this._state,e&&this._lastCallId),Ee.batchedUpdates(()=>this._stop(t,e)),this}reset(){this._update({reset:!0})}eventObserved(e){e.type=="change"?this._start():e.type=="priority"&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=se.obj(n)?n[t]:n,(n==null||Gm(n))&&(n=void 0),r=se.obj(r)?r[t]:r,r==null&&(r=void 0);const i={to:n,from:r};return iv(this)||(e.reverse&&([n,r]=[r,n]),r=gn(r),se.und(r)?Pr(this)||this._set(n):this._set(r)),i}_update({...e},t){const{key:n,defaultProps:r}=this;e.default&&Object.assign(r,ud(e,(s,o)=>/^on/.test(o)?xE(s,n):s)),AE(this,e,"onProps"),jl(this,"onProps",e,this);const i=this._prepareNode(e);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const a=this._state;return NE(++this._lastCallId,{key:n,props:e,defaultProps:r,state:a,actions:{pause:()=>{Tl(this)||(OE(this,!0),hl(a.pauseQueue),jl(this,"onPause",dr(this,Cl(this,this.animation.to)),this))},resume:()=>{Tl(this)&&(OE(this,!1),$i(this)&&this._resume(),hl(a.resumeQueue),jl(this,"onResume",dr(this,Cl(this,this.animation.to)),this))},start:this._merge.bind(this,i)}}).then(s=>{if(e.loop&&s.finished&&!(t&&s.noop)){const o=$E(e);if(o)return this._update(o,!0)}return s})}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(Is(this));const r=!se.und(e.to),i=!se.und(e.from);if(r||i)if(t.callId>this._lastToId)this._lastToId=t.callId;else return n(Is(this));const{key:a,defaultProps:s,animation:o}=this,{to:l,from:u}=o;let{to:c=l,from:d=u}=e;i&&!r&&(!t.default||se.und(c))&&(c=d),t.reverse&&([c,d]=[d,c]);const f=!ii(d,u);f&&(o.from=d),d=gn(d);const g=!ii(c,l);g&&this._focus(c);const p=Gm(t.to),{config:m}=o,{decay:v,velocity:x}=m;(r||i)&&(m.velocity=0),t.config&&!p&&E6(m,on(t.config,a),t.config!==s.config?on(s.config,a):void 0);let y=Pr(this);if(!y||se.und(c))return n(dr(this,!0));const b=se.und(t.reset)?i&&!t.default:!se.und(d)&&Sl(t.reset,a),k=b?d:this.get(),w=Nl(c),S=se.num(w)||se.arr(w)||nd(w),N=!p&&(!S||Sl(s.immediate||t.immediate,a));if(g){const O=Ym(c);if(O!==y.constructor)if(N)y=this._set(w);else throw Error(`Cannot animate between ${y.constructor.name} and ${O.name}, as the "to" prop suggests`)}const E=y.constructor;let T=Kn(c),C=!1;if(!T){const O=b||!iv(this)&&f;(g||O)&&(C=ii(Nl(k),w),T=!C),(!ii(o.immediate,N)&&!N||!ii(m.decay,v)||!ii(m.velocity,x))&&(T=!0)}if(C&&$i(this)&&(o.changed&&!b?T=!0:T||this._stop(l)),!p&&((T||Kn(l))&&(o.values=y.getPayload(),o.toValues=Kn(c)?null:E==kl?[1]:sn(w)),o.immediate!=N&&(o.immediate=N,!N&&!b&&this._set(l)),T)){const{onRest:O}=o;_e(j6,M=>AE(this,t,M));const $=dr(this,Cl(this,l));hl(this._pendingCalls,$),this._pendingCalls.add(n),o.changed&&Ee.batchedUpdates(()=>{var M;o.changed=!b,O==null||O($,this),b?on(s.onRest,$):(M=o.onStart)==null||M.call(o,$,this)})}b&&this._set(k),p?n(TE(t.to,t,this._state,this)):T?this._start():$i(this)&&!g?this._pendingCalls.add(n):n(EE(k))}_focus(e){const t=this.animation;e!==t.to&&(rE(this)&&this._detach(),t.to=e,rE(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Kn(t)&&(Ls(t,this),tv(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Kn(e)&&yl(e,this)}_set(e,t=!0){const n=gn(e);if(!se.und(n)){const r=Pr(this);if(!r||!ii(n,r.getValue())){const i=Ym(n);!r||r.constructor!=i?Km(this,i.create(n)):r.setValue(n),r&&Ee.batchedUpdates(()=>{this._onChange(n,t)})}}return Pr(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,jl(this,"onStart",dr(this,Cl(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),on(this.animation.onChange,e,this)),on(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Pr(this).reset(gn(e.to)),e.immediate||(e.fromValues=e.values.map(t=>t.lastPosition)),$i(this)||(jE(this,!0),Tl(this)||this._resume())}_resume(){qn.skipAnimation?this.finish():gl.start(this)}_stop(e,t){if($i(this)){jE(this,!1);const n=this.animation;_e(n.values,i=>{i.done=!0}),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),vl(this,{type:"idle",parent:this});const r=t?Is(this.get()):dr(this.get(),Cl(this,e??n.to));hl(this._pendingCalls,r),n.changed&&(n.changed=!1,jl(this,"onRest",r,this))}}};function Cl(e,t){const n=Nl(t),r=Nl(e.get());return ii(r,n)}function $E(e,t=e.loop,n=e.to){const r=on(t);if(r){const i=r!==!0&&cd(r),a=(i||e).reverse,s=!i||i.reset;return Ml({...e,loop:t,default:!1,pause:void 0,to:!a||Gm(n)?n:void 0,from:s?e.from:void 0,reset:s,...i})}}function Ml(e){const{to:t,from:n}=e=cd(e),r=new Set;return se.obj(t)&&PE(t,r),se.obj(n)&&PE(n,r),e.keys=r.size?Array.from(r):null,e}function M6(e){const t=Ml(e);return se.und(t.default)&&(t.default=ud(t)),t}function PE(e,t){$r(e,(n,r)=>n!=null&&t.add(r))}var j6=["onStart","onRest","onChange","onPause","onResume"];function AE(e,t,n){e.animation[n]=t[n]!==bE(t,n)?xE(t[n],e.key):void 0}function jl(e,t,...n){var r,i,a,s;(i=(r=e.animation)[t])==null||i.call(r,...n),(s=(a=e.defaultProps)[t])==null||s.call(a,...n)}var O6=["onStart","onChange","onRest"],$6=1,sv=class{constructor(e,t){this.id=$6++,this.springs={},this.queue=[],this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start({default:!0,...e})}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every(e=>e.idle&&!e.isDelayed&&!e.isPaused)}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each((t,n)=>e[n]=t.get()),e}set(e){for(const t in e){const n=e[t];se.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(Ml(e)),this}start(e){let{queue:t}=this;return e?t=sn(e).map(Ml):this.queue=[],this._flush?this._flush(this,t):(zE(this,t),ov(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;_e(sn(t),r=>n[r].stop(!!e))}else El(this._state,this._lastAsyncId),this.each(n=>n.stop(!!e));return this}pause(e){if(se.und(e))this.start({pause:!0});else{const t=this.springs;_e(sn(e),n=>t[n].pause())}return this}resume(e){if(se.und(e))this.start({pause:!1});else{const t=this.springs;_e(sn(e),n=>t[n].resume())}return this}each(e){$r(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,fl(e,([o,l])=>{l.value=this.get(),o(l,this,this._item)}));const a=!r&&this._started,s=i||a&&n.size?this.get():null;i&&t.size&&fl(t,([o,l])=>{l.value=s,o(l,this,this._item)}),a&&(this._started=!1,fl(n,([o,l])=>{l.value=s,o(l,this,this._item)}))}eventObserved(e){if(e.type=="change")this._changed.add(e.parent),e.idle||this._active.add(e.parent);else if(e.type=="idle")this._active.delete(e.parent);else return;Ee.onFrame(this._onFrame)}};function ov(e,t){return Promise.all(t.map(n=>LE(e,n))).then(n=>Qm(e,n))}async function LE(e,t,n){const{keys:r,to:i,from:a,loop:s,onRest:o,onResolve:l}=t,u=se.obj(t.default)&&t.default;s&&(t.loop=!1),i===!1&&(t.to=null),a===!1&&(t.from=null);const c=se.arr(i)||se.fun(i)?i:void 0;c?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):_e(O6,m=>{const v=t[m];if(se.fun(v)){const x=e._events[m];t[m]=({finished:y,cancelled:b})=>{const k=x.get(v);k?(y||(k.finished=!1),b&&(k.cancelled=!0)):x.set(v,{value:null,finished:y||!1,cancelled:b||!1})},u&&(u[m]=t[m])}});const d=e._state;t.pause===!d.paused?(d.paused=t.pause,hl(t.pause?d.pauseQueue:d.resumeQueue)):d.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map(m=>e.springs[m].start(t)),g=t.cancel===!0||bE(t,"cancel")===!0;(c||g&&d.asyncId)&&f.push(NE(++e._lastAsyncId,{props:t,state:d,actions:{pause:Lm,resume:Lm,start(m,v){g?(El(d,e._lastAsyncId),v(Is(e))):(m.onRest=o,v(TE(c,m,d,e)))}}})),d.paused&&await new Promise(m=>{d.resumeQueue.add(m)});const p=Qm(e,await Promise.all(f));if(s&&p.finished&&!(n&&p.noop)){const m=$E(t,s,i);if(m)return zE(e,[m]),LE(e,m,!0)}return l&&Ee.batchedUpdates(()=>l(p,e,e.item)),p}function lv(e,t){const n={...e.springs};return t&&_e(sn(t),r=>{se.und(r.keys)&&(r=Ml(r)),se.obj(r.to)||(r={...r,to:void 0}),FE(n,r,i=>IE(i))}),DE(e,n),n}function DE(e,t){$r(t,(n,r)=>{e.springs[r]||(e.springs[r]=n,Ls(n,e))})}function IE(e,t){const n=new av;return n.key=e,t&&Ls(n,t),n}function FE(e,t,n){t.keys&&_e(t.keys,r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)})}function zE(e,t){_e(t,n=>{FE(e.springs,n,r=>IE(r,e))})}var Fs=({children:e,...t})=>{const n=_.useContext(fd),r=t.pause||!!n.pause,i=t.immediate||!!n.immediate;t=u6(()=>({pause:r,immediate:i}),[r,i]);const{Provider:a}=fd;return $a.createElement(a,{value:t},e)},fd=P6(Fs,{});Fs.Provider=fd.Provider,Fs.Consumer=fd.Consumer;function P6(e,t){return Object.assign(e,$a.createContext(t)),e.Provider._context=e,e.Consumer._context=e,e}var hd=()=>{const e=[],t=function(r){ZB();const i=[];return _e(e,(a,s)=>{if(se.und(r))i.push(a.start());else{const o=n(r,a,s);o&&i.push(a.start(o))}}),i};t.current=e,t.add=function(r){e.includes(r)||e.push(r)},t.delete=function(r){const i=e.indexOf(r);~i&&e.splice(i,1)},t.pause=function(){return _e(e,r=>r.pause(...arguments)),this},t.resume=function(){return _e(e,r=>r.resume(...arguments)),this},t.set=function(r){_e(e,(i,a)=>{const s=se.fun(r)?r(a,i):r;s&&i.set(s)})},t.start=function(r){const i=[];return _e(e,(a,s)=>{if(se.und(r))i.push(a.start());else{const o=this._getProps(r,a,s);o&&i.push(a.start(o))}}),i},t.stop=function(){return _e(e,r=>r.stop(...arguments)),this},t.update=function(r){return _e(e,(i,a)=>i.update(this._getProps(r,i,a))),this};const n=function(r,i,a){return se.fun(r)?r(a,i):r};return t._getProps=n,t};function uv(e,t,n){const r=se.fun(t)&&t;r&&!n&&(n=[]);const i=_.useMemo(()=>r||arguments.length==3?hd():void 0,[]),a=_.useRef(0),s=qm(),o=_.useMemo(()=>({ctrls:[],queue:[],flush(x,y){const b=lv(x,y);return a.current>0&&!o.queue.length&&!Object.keys(b).some(w=>!x.springs[w])?ov(x,y):new Promise(w=>{DE(x,b),o.queue.push(()=>{w(ov(x,y))}),s()})}}),[]),l=_.useRef([...o.ctrls]),u=[],c=Vm(e)||0;_.useMemo(()=>{_e(l.current.slice(e,c),x=>{Xm(x,i),x.stop(!0)}),l.current.length=e,d(c,e)},[e]),_.useMemo(()=>{d(0,Math.min(c,e))},n);function d(x,y){for(let b=x;b<y;b++){const k=l.current[b]||(l.current[b]=new sv(null,o.flush)),w=r?r(b,k):t[b];w&&(u[b]=M6(w))}}const f=l.current.map((x,y)=>lv(x,u[y])),g=_.useContext(Fs),p=Vm(g),m=g!==p&&_E(g);mn(()=>{a.current++,o.ctrls=l.current;const{queue:x}=o;x.length&&(o.queue=[],_e(x,y=>y())),_e(l.current,(y,b)=>{i==null||i.add(y),m&&y.start({default:g});const k=u[b];k&&(Jm(y,k.ref),y.ref?y.queue.push(k):y.start(k))})}),ad(()=>()=>{_e(o.ctrls,x=>x.stop(!0))});const v=f.map(x=>({...x}));return i?[v,i]:v}function Ca(e,t){const n=se.fun(e),[[r],i]=uv(1,n?e:[e],n?t||[]:t);return n||arguments.length==2?[r,i]:r}var A6=()=>hd(),L6=()=>_.useState(A6)[0],D6=(e,t)=>{const n=o6(()=>new av(e,t));return ad(()=>()=>{n.stop()}),n};function RE(e,t,n){const r=se.fun(t)&&t;r&&!n&&(n=[]);let i=!0,a;const s=uv(e,(o,l)=>{const u=r?r(o,l):t;return a=u.ref,i=i&&u.reverse,u},n||[{}]);if(mn(()=>{_e(s[1].current,(o,l)=>{const u=s[1].current[l+(i?1:-1)];if(Jm(o,a),o.ref){u&&o.update({to:u.springs});return}u?o.start({to:u.springs}):o.start()})},n),r||arguments.length==3){const o=a??s[1];return o._getProps=(l,u,c)=>{const d=se.fun(l)?l(c,u):l;if(d){const f=o.current[c+(d.reverse?1:-1)];return f&&(d.to=f.springs),d}},s}return s[0]}function BE(e,t,n){const r=se.fun(t)&&t,{reset:i,sort:a,trail:s=0,expires:o=!0,exitBeforeEnter:l=!1,onDestroyed:u,ref:c,config:d}=r?r():t,f=_.useMemo(()=>r||arguments.length==3?hd():void 0,[]),g=sn(e),p=[],m=_.useRef(null),v=i?null:m.current;mn(()=>{m.current=p}),ad(()=>(_e(p,j=>{f==null||f.add(j.ctrl),j.ctrl.ref=f}),()=>{_e(m.current,j=>{j.expired&&clearTimeout(j.expirationId),Xm(j.ctrl,f),j.ctrl.stop(!0)})}));const x=F6(g,r?r():t,v),y=i&&m.current||[];mn(()=>_e(y,({ctrl:j,item:P,key:F})=>{Xm(j,f),on(u,P,F)}));const b=[];if(v&&_e(v,(j,P)=>{j.expired?(clearTimeout(j.expirationId),y.push(j)):(P=b[P]=x.indexOf(j.key),~P&&(p[P]=j))}),_e(g,(j,P)=>{p[P]||(p[P]={key:x[P],item:j,phase:"mount",ctrl:new sv},p[P].ctrl.item=j)}),b.length){let j=-1;const{leave:P}=r?r():t;_e(b,(F,B)=>{const W=v[B];~F?(j=p.indexOf(W),p[j]={...W,item:g[F]}):P&&p.splice(++j,0,W)})}se.fun(a)&&p.sort((j,P)=>a(j.item,P.item));let k=-s;const w=qm(),S=ud(t),N=new Map,E=_.useRef(new Map),T=_.useRef(!1);_e(p,(j,P)=>{const F=j.key,B=j.phase,W=r?r():t;let q,D;const A=on(W.delay||0,F);if(B=="mount")q=W.enter,D="enter";else{const J=x.indexOf(F)<0;if(B!="leave")if(J)q=W.leave,D="leave";else if(q=W.update)D="update";else return;else if(!J)q=W.enter,D="enter";else return}if(q=on(q,j.item,P),q=se.obj(q)?cd(q):{to:q},!q.config){const J=d||S.config;q.config=on(J,j.item,P,D)}k+=s;const U={...S,delay:A+k,ref:c,immediate:W.immediate,reset:!1,...q};if(D=="enter"&&se.und(U.from)){const J=r?r():t,R=se.und(J.initial)||v?J.from:J.initial;U.from=on(R,j.item,P)}const{onResolve:Y}=U;U.onResolve=J=>{on(Y,J);const R=m.current,K=R.find(Z=>Z.key===F);if(K&&!(J.cancelled&&K.phase!="update")&&K.ctrl.idle){const Z=R.every(z=>z.ctrl.idle);if(K.phase=="leave"){const z=on(o,K.item);if(z!==!1){const X=z===!0?0:z;if(K.expired=!0,!Z&&X>0){X<=2147483647&&(K.expirationId=setTimeout(w,X));return}}}Z&&R.some(z=>z.expired)&&(E.current.delete(K),l&&(T.current=!0),w())}};const G=lv(j.ctrl,U);D==="leave"&&l?E.current.set(j,{phase:D,springs:G,payload:U}):N.set(j,{phase:D,springs:G,payload:U})});const C=_.useContext(Fs),O=Vm(C),$=C!==O&&_E(C);mn(()=>{$&&_e(p,j=>{j.ctrl.start({default:C})})},[C]),_e(N,(j,P)=>{if(E.current.size){const F=p.findIndex(B=>B.key===P.key);p.splice(F,1)}}),mn(()=>{_e(E.current.size?E.current:N,({phase:j,payload:P},F)=>{const{ctrl:B}=F;F.phase=j,f==null||f.add(B),$&&j=="enter"&&B.start({default:C}),P&&(Jm(B,P.ref),(B.ref||f)&&!T.current?B.update(P):(B.start(P),T.current&&(T.current=!1)))})},i?void 0:n);const M=j=>$a.createElement($a.Fragment,null,p.map((P,F)=>{const{springs:B}=N.get(P)||P.ctrl,W=j({...B},P.item,P,F);return W&&W.type?$a.createElement(W.type,{...W.props,key:se.str(P.key)||se.num(P.key)?P.key:P.ctrl.id,ref:W.ref}):W}));return f?[M,f]:M}var I6=1;function F6(e,{key:t,keys:n=t},r){if(n===null){const i=new Set;return e.map(a=>{const s=r&&r.find(o=>o.item===a&&o.phase!=="leave"&&!i.has(o));return s?(i.add(s),s.key):I6++})}return se.und(n)?e:se.fun(n)?e.map(n):sn(n)}var z6=({container:e,...t}={})=>{const[n,r]=Ca(()=>({scrollX:0,scrollY:0,scrollXProgress:0,scrollYProgress:0,...t}),[]);return mn(()=>{const i=s6(({x:a,y:s})=>{r.start({scrollX:a.current,scrollXProgress:a.progress,scrollY:s.current,scrollYProgress:s.progress})},{container:(e==null?void 0:e.current)||void 0});return()=>{_e(Object.values(n),a=>a.stop()),i()}},[]),n},R6=({container:e,...t})=>{const[n,r]=Ca(()=>({width:0,height:0,...t}),[]);return mn(()=>{const i=dE(({width:a,height:s})=>{r.start({width:a,height:s,immediate:n.width.get()===0||n.height.get()===0})},{container:(e==null?void 0:e.current)||void 0});return()=>{_e(Object.values(n),a=>a.stop()),i()}},[]),n},B6={any:0,all:1};function W6(e,t){const[n,r]=_.useState(!1),i=_.useRef(),a=se.fun(e)&&e,s=a?a():{},{to:o={},from:l={},...u}=s,c=a?t:e,[d,f]=Ca(()=>({from:l,...u}),[]);return mn(()=>{const g=i.current,{root:p,once:m,amount:v="any",...x}=c??{};if(!g||m&&n||typeof IntersectionObserver>"u")return;const y=new WeakMap,b=()=>(o&&f.start(o),r(!0),m?void 0:()=>{l&&f.start(l),r(!1)}),k=S=>{S.forEach(N=>{const E=y.get(N.target);if(N.isIntersecting!==!!E)if(N.isIntersecting){const T=b();se.fun(T)?y.set(N.target,T):w.unobserve(N.target)}else E&&(E(),y.delete(N.target))})},w=new IntersectionObserver(k,{root:p&&p.current||void 0,threshold:typeof v=="number"||Array.isArray(v)?v:B6[v],...x});return w.observe(g),()=>w.unobserve(g)},[c]),a?[i,d]:[i,n]}function U6({children:e,...t}){return e(Ca(t))}function H6({items:e,children:t,...n}){const r=RE(e.length,n);return e.map((i,a)=>{const s=t(i,a);return se.fun(s)?s(r[a]):s})}function q6({items:e,children:t,...n}){return BE(e,n)(t)}var pd=class extends dd{constructor(e,t){super(),this.source=e,this.idle=!0,this._active=new Set,this.calc=Ps(...t);const n=this._get(),r=Ym(n);Km(this,r.create(n))}advance(e){const t=this._get(),n=this.get();ii(t,n)||(Pr(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&WE(this._active)&&cv(this)}_get(){const e=se.arr(this.source)?this.source.map(gn):sn(gn(this.source));return this.calc(...e)}_start(){this.idle&&!WE(this._active)&&(this.idle=!1,_e(sd(this),e=>{e.done=!1}),qn.skipAnimation?(Ee.batchedUpdates(()=>this.advance()),cv(this)):gl.start(this))}_attach(){let e=1;_e(sn(this.source),t=>{Kn(t)&&Ls(t,this),tv(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))}),this.priority=e,this._start()}_detach(){_e(sn(this.source),e=>{Kn(e)&&yl(e,this)}),this._active.clear(),cv(this)}eventObserved(e){e.type=="change"?e.idle?this.advance():(this._active.add(e.parent),this._start()):e.type=="idle"?this._active.delete(e.parent):e.type=="priority"&&(this.priority=sn(this.source).reduce((t,n)=>Math.max(t,(tv(n)?n.priority:0)+1),0))}};function V6(e){return e.idle!==!1}function WE(e){return!e.size||Array.from(e).every(V6)}function cv(e){e.idle||(e.idle=!0,_e(sd(e),t=>{t.done=!0}),vl(e,{type:"idle",parent:e}))}var K6=(e,...t)=>new pd(e,t),Y6=(e,...t)=>(cE(),new pd(e,t));qn.assign({createStringInterpolator:lE,to:(e,t)=>new pd(e,t)});var G6=gl.advance,UE=/^--/;function X6(e,t){return t==null||typeof t=="boolean"||t===""?"":typeof t=="number"&&t!==0&&!UE.test(e)&&!(Ol.hasOwnProperty(e)&&Ol[e])?t+"px":(""+t).trim()}var HE={};function J6(e,t){if(!e.nodeType||!e.setAttribute)return!1;const n=e.nodeName==="filter"||e.parentNode&&e.parentNode.nodeName==="filter",{className:r,style:i,children:a,scrollTop:s,scrollLeft:o,viewBox:l,...u}=t,c=Object.values(u),d=Object.keys(u).map(f=>n||e.hasAttribute(f)?f:HE[f]||(HE[f]=f.replace(/([A-Z])/g,g=>"-"+g.toLowerCase())));a!==void 0&&(e.textContent=a);for(const f in i)if(i.hasOwnProperty(f)){const g=X6(f,i[f]);UE.test(f)?e.style.setProperty(f,g):e.style[f]=g}d.forEach((f,g)=>{e.setAttribute(f,c[g])}),r!==void 0&&(e.className=r),s!==void 0&&(e.scrollTop=s),o!==void 0&&(e.scrollLeft=o),l!==void 0&&e.setAttribute("viewBox",l)}var Ol={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Z6=(e,t)=>e+t.charAt(0).toUpperCase()+t.substring(1),Q6=["Webkit","Ms","Moz","O"];Ol=Object.keys(Ol).reduce((e,t)=>(Q6.forEach(n=>e[Z6(n,t)]=e[t]),e),Ol);var e4=/^(matrix|translate|scale|rotate|skew)/,t4=/^(translate)/,n4=/^(rotate|skew)/,dv=(e,t)=>se.num(e)&&e!==0?e+t:e,gd=(e,t)=>se.arr(e)?e.every(n=>gd(n,t)):se.num(e)?e===t:parseFloat(e)===t,r4=class extends ld{constructor({x:e,y:t,z:n,...r}){const i=[],a=[];(e||t||n)&&(i.push([e||0,t||0,n||0]),a.push(s=>[`translate3d(${s.map(o=>dv(o,"px")).join(",")})`,gd(s,0)])),$r(r,(s,o)=>{if(o==="transform")i.push([s||""]),a.push(l=>[l,l===""]);else if(e4.test(o)){if(delete r[o],se.und(s))return;const l=t4.test(o)?"px":n4.test(o)?"deg":"";i.push(sn(s)),a.push(o==="rotate3d"?([u,c,d,f])=>[`rotate3d(${u},${c},${d},${dv(f,l)})`,gd(f,0)]:u=>[`${o}(${u.map(c=>dv(c,l)).join(",")})`,gd(u,o.startsWith("scale")?1:0)])}}),i.length&&(r.transform=new i4(i,a)),super(r)}},i4=class extends iE{constructor(e,t){super(),this.inputs=e,this.transforms=t,this._value=null}get(){return this._value||(this._value=this._get())}_get(){let e="",t=!0;return _e(this.inputs,(n,r)=>{const i=gn(n[0]),[a,s]=this.transforms[r](se.arr(i)?i:n.map(gn));e+=" "+a,t=t&&s}),t?"none":e}observerAdded(e){e==1&&_e(this.inputs,t=>_e(t,n=>Kn(n)&&Ls(n,this)))}observerRemoved(e){e==0&&_e(this.inputs,t=>_e(t,n=>Kn(n)&&yl(n,this)))}eventObserved(e){e.type=="change"&&(this._value=null),vl(this,e)}},a4=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"];qn.assign({batchedUpdates:xn.unstable_batchedUpdates,createStringInterpolator:lE,colors:OB});var s4=y6(a4,{applyAnimatedValues:J6,createAnimatedStyle:e=>new r4(e),getComponentProps:({scrollTop:e,scrollLeft:t,...n})=>n}),fv=s4.animated;const o4=Object.freeze(Object.defineProperty({__proto__:null,Any:x6,BailSignal:ev,Controller:sv,FrameValue:dd,Globals:qn,Interpolation:pd,Spring:U6,SpringContext:Fs,SpringRef:hd,SpringValue:av,Trail:H6,Transition:q6,a:fv,animated:fv,config:wE,createInterpolator:Ps,easings:nE,inferTo:cd,interpolate:Y6,to:K6,update:G6,useChain:S6,useInView:W6,useIsomorphicLayoutEffect:mn,useReducedMotion:f6,useResize:R6,useScroll:z6,useSpring:Ca,useSpringRef:L6,useSpringValue:D6,useSprings:uv,useTrail:RE,useTransition:BE},Symbol.toStringTag,{value:"Module"}));var hv={};const md=Gn(mP),$l=Gn(BD);var pv={};const qE=Gn(f3),gv=Gn(kR);var mv={},Pi={};Pi.__esModule=!0,Pi.default=void 0;var l4={top:"top",left:"left",right:"right",bottom:"bottom"},u4=l4;Pi.default=u4,mv.__esModule=!0,mv.default=d4;var Pl=c4(Pi);function c4(e){return e&&e.__esModule?e:{default:e}}function d4(e){var t=e.labelOffset,n=e.labelProps,r=e.orientation,i=e.range,a=e.tickLabelFontSize,s=e.tickLength,o=r===Pl.default.left||r===Pl.default.top?-1:1,l,u,c;if(r===Pl.default.top||r===Pl.default.bottom){var d=r===Pl.default.bottom&&typeof n.fontSize=="number"?n.fontSize:0;l=(Number(i[0])+Number(i[i.length-1]))/2,u=o*(s+t+a+d)}else l=o*((Number(i[0])+Number(i[i.length-1]))/2),u=-(s+t),c="rotate("+o*90+")";return{x:l,y:u,transform:c}}var vv={};vv.__esModule=!0,vv.default=v4;var yv=xv(_),f4=xv(Zr),h4=qE,p4=md,g4=gv,m4=xv(Pi);function xv(e){return e&&e.__esModule?e:{default:e}}function Al(){return Al=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Al.apply(this,arguments)}function v4(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.tickClassName,a=e.tickComponent,s=e.tickLabelProps,o=e.tickStroke,l=o===void 0?"#222":o,u=e.tickTransform,c=e.ticks,d=e.strokeWidth,f=e.tickLineProps;return c.map(function(g){var p,m=g.value,v=g.index,x=g.from,y=g.to,b=g.formattedValue,k=(p=s[v])!=null?p:{},w=Math.max(10,typeof k.fontSize=="number"&&k.fontSize||0),S=y.y+(n&&r!==m4.default.top?w:0);return yv.default.createElement(p4.Group,{key:"visx-tick-"+m+"-"+v,className:(0,f4.default)("visx-axis-tick",i),transform:u},!t&&yv.default.createElement(h4.Line,Al({from:x,to:y,stroke:l,strokeWidth:d,strokeLinecap:"square"},f)),a?a(Al({},k,{x:y.x,y:S,formattedValue:b})):yv.default.createElement(g4.Text,Al({x:y.x,y:S},k),b))})}pv.__esModule=!0,pv.default=k4;var vd=Ll(_),VE=Ll(Zr),y4=qE,x4=gv,b4=Ll(mv),_4=Ll(Pi),w4=Ll(vv);function Ll(e){return e&&e.__esModule?e:{default:e}}function Dl(){return Dl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dl.apply(this,arguments)}var KE={textAnchor:"middle",fontFamily:"Arial",fontSize:10,fill:"#222"};function k4(e){var t=e.axisFromPoint,n=e.axisLineClassName,r=e.axisToPoint,i=e.hideAxisLine,a=e.hideTicks,s=e.horizontal,o=e.label,l=o===void 0?"":o,u=e.labelClassName,c=e.labelOffset,d=c===void 0?14:c,f=e.labelProps,g=e.orientation,p=g===void 0?_4.default.bottom:g,m=e.scale,v=e.stroke,x=v===void 0?"#222":v,y=e.strokeDasharray,b=e.strokeWidth,k=b===void 0?1:b,w=e.tickClassName,S=e.tickComponent,N=e.tickLineProps,E=e.tickLabelProps,T=e.tickLength,C=T===void 0?8:T,O=e.tickStroke,$=O===void 0?"#222":O,M=e.tickTransform,j=e.ticks,P=e.ticksComponent,F=P===void 0?w4.default:P,B=Dl({},KE,f),W=Dl({},KE,typeof E=="object"?E:null),q=j.map(function(A){var U=A.value,Y=A.index;return typeof E=="function"?E(U,Y,j):W}),D=Math.max.apply(Math,[10].concat(q.map(function(A){return typeof A.fontSize=="number"?A.fontSize:0})));return vd.default.createElement(vd.default.Fragment,null,F({hideTicks:a,horizontal:s,orientation:p,scale:m,tickClassName:w,tickComponent:S,tickLabelProps:q,tickStroke:$,tickTransform:M,ticks:j,strokeWidth:k,tickLineProps:N}),!i&&vd.default.createElement(y4.Line,{className:(0,VE.default)("visx-axis-line",n),from:t,to:r,stroke:x,strokeWidth:k,strokeDasharray:y}),l&&vd.default.createElement(x4.Text,Dl({className:(0,VE.default)("visx-axis-label",u)},(0,b4.default)({labelOffset:d,labelProps:B,orientation:p,range:m.range(),tickLabelFontSize:D,tickLength:C}),B),l))}var bv={};bv.__esModule=!0,bv.default=S4;function S4(e,t){t===void 0&&(t="center");var n=e;if(t!=="start"&&"bandwidth"in n){var r=n.bandwidth();return t==="center"&&(r/=2),n.round()&&(r=Math.round(r)),function(i){var a=n(i);return typeof a=="number"?a+r:a}}return e}var _v={};_v.__esModule=!0,_v.default=E4;var N4=$l;function E4(e){var t=e;return"tickFormat"in t?t.tickFormat():N4.toString}var wv={};wv.__esModule=!0,wv.default=C4;var T4=Wc;function C4(e,t){var n=e.x,r=e.y;return new T4.Point(t?{x:n,y:r}:{x:r,y:n})}var Il={};Il.__esModule=!0,Il.default=M4,Il.defaultAxisRangePadding=void 0;function kv(){return kv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},kv.apply(this,arguments)}var yd=0;Il.defaultAxisRangePadding=yd;function M4(e){return e===void 0&&(e=yd),typeof e=="number"?{start:e,end:e}:kv({start:yd,end:yd},e)}hv.__esModule=!0,hv.default=z4,ai(yi);var j4=ai(_),O4=ai(Zr),$4=md,YE=$l,P4=ai(pv),A4=ai(bv),L4=ai(_v),xd=ai(wv),bd=ai(Pi),D4=ai(Il),I4=["children","axisClassName","hideAxisLine","hideTicks","hideZero","innerRef","left","numTicks","orientation","rangePadding","scale","tickFormat","tickLength","tickValues","top"];function ai(e){return e&&e.__esModule?e:{default:e}}function Sv(){return Sv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sv.apply(this,arguments)}function F4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function z4(e){var t=e.children,n=t===void 0?P4.default:t,r=e.axisClassName,i=e.hideAxisLine,a=i===void 0?!1:i,s=e.hideTicks,o=s===void 0?!1:s,l=e.hideZero,u=l===void 0?!1:l,c=e.innerRef,d=e.left,f=d===void 0?0:d,g=e.numTicks,p=g===void 0?10:g,m=e.orientation,v=m===void 0?bd.default.bottom:m,x=e.rangePadding,y=x===void 0?0:x,b=e.scale,k=e.tickFormat,w=e.tickLength,S=w===void 0?8:w,N=e.tickValues,E=e.top,T=E===void 0?0:E,C=F4(e,I4),O=k??(0,L4.default)(b),$=v===bd.default.left,M=v===bd.default.top,j=M||v===bd.default.bottom,P=(0,A4.default)(b),F=$||M?-1:1,B=b.range(),W=(0,D4.default)(y),q=(0,xd.default)({x:Number(B[0])+.5-W.start,y:0},j),D=(0,xd.default)({x:Number(B[B.length-1])+.5+W.end,y:0},j),A=(N??(0,YE.getTicks)(b,p)).filter(function(Y){return!u||Y!==0&&Y!=="0"}).map(function(Y,G){return{value:Y,index:G}}),U=A.map(function(Y){var G=Y.value,J=Y.index,R=(0,YE.coerceNumber)(P(G));return{value:G,index:J,from:(0,xd.default)({x:R,y:0},j),to:(0,xd.default)({x:R,y:S*F},j),formattedValue:O(G,J,A)}});return j4.default.createElement($4.Group,{className:(0,O4.default)("visx-axis",r),innerRef:c,top:T,left:f},n(Sv({},C,{axisFromPoint:q,axisToPoint:D,hideAxisLine:a,hideTicks:o,hideZero:u,horizontal:j,numTicks:p,orientation:v,rangePadding:y,scale:b,tickFormat:O,tickLength:S,tickPosition:P,tickSign:F,ticks:U})))}var Nv={};const GE=Gn(o4);var _d={};_d.__esModule=!0,_d.default=W4;var R4=_,B4=$l;function wd(e,t,n,r,i){var a;switch(e){case"center":return i;case"min":return n??0;case"max":return r??0;case"outside":default:return(a=(t??0)<i?n:r)!=null?a:0}}function XE(e){var t=e.from,n=e.to;return{fromX:t.x,toX:n.x,fromY:t.y,toY:n.y,opacity:1}}function W4(e){var t=e.scale,n=e.animateXOrY,r=e.animationTrajectory,i=r===void 0?"outside":r,a=n==="x";return(0,R4.useMemo)(function(){var s=t.range().map(B4.coerceNumber),o=s[0],l=s[1],u=l!=null&&o!=null&&l<o,c=u?[l,o]:[o,l],d=c[0],f=c[1],g=l!=null&&o!=null?Math.abs(l-o):0,p=(d??0)+g/2,m=i;!a&&i==="min"&&(m="max"),!a&&i==="max"&&(m="min");var v=function(y){var b=y.from,k=y.to;return{fromX:a?wd(m,b.x,d,f,p):b.x,toX:a?wd(m,b.x,d,f,p):k.x,fromY:a?b.y:wd(m,b.y,d,f,p),toY:a?k.y:wd(m,b.y,d,f,p),opacity:0}};return{from:v,leave:v,enter:XE,update:XE}},[t,a,i])}Nv.__esModule=!0,Nv.default=K4;var zs=kd(_),Fl=GE,U4=kd(Zr),H4=kd(Pi),q4=gv,V4=kd(_d);function kd(e){return e&&e.__esModule?e:{default:e}}function zl(){return zl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zl.apply(this,arguments)}function K4(e){var t=e.hideTicks,n=e.horizontal,r=e.orientation,i=e.scale,a=e.tickClassName,s=e.tickComponent,o=e.tickLabelProps,l=e.tickStroke,u=l===void 0?"#222":l,c=e.tickTransform,d=e.ticks,f=e.tickLineProps,g=e.animationTrajectory,p=(0,Fl.useTransition)(d,zl({},(0,V4.default)({scale:i,animateXOrY:n?"x":"y",animationTrajectory:g}),{keys:function(v){return"tick-"+v.value+"-"+v.index}}));return zs.default.createElement(zs.default.Fragment,null,p(function(m,v,x,y){var b,k,w=m.fromX,S=m.toX,N=m.fromY,E=m.toY,T=m.opacity,C=x.key,O=(b=(k=o[y])!=null?k:o[0])!=null?b:{};return v==null||C==null?null:zs.default.createElement(Fl.animated.g,{key:C,className:(0,U4.default)("visx-axis-tick",a),transform:c},!t&&zs.default.createElement(Fl.animated.line,zl({x1:w,x2:S,y1:N,y2:E,stroke:u,strokeLinecap:"square",strokeOpacity:T},f)),zs.default.createElement(Fl.animated.g,{key:y,transform:(0,Fl.to)([S,E],function($,M){var j;return"translate("+$+","+(M+(r===H4.default.bottom&&typeof O.fontSize=="number"?(j=O.fontSize)!=null?j:10:0))+")"}),opacity:T},s?s(zl({},O,{x:S,y:E,formattedValue:v==null?void 0:v.formattedValue})):zs.default.createElement(q4.Text,O,v==null?void 0:v.formattedValue)))}))}var Y4=eW;Tv(yi);var Ev=Z4(_),G4=Tv(hv),X4=Tv(Nv),J4=["animationTrajectory","tickComponent"];function JE(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,n=new WeakMap;return(JE=function(i){return i?n:t})(e)}function Z4(e,t){if(e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var n=JE(t);if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var s=i?Object.getOwnPropertyDescriptor(e,a):null;s&&(s.get||s.set)?Object.defineProperty(r,a,s):r[a]=e[a]}return r.default=e,n&&n.set(e,r),r}function Tv(e){return e&&e.__esModule?e:{default:e}}function Sd(){return Sd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sd.apply(this,arguments)}function Q4(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function eW(e){var t=e.animationTrajectory,n=e.tickComponent,r=Q4(e,J4),i=(0,Ev.useMemo)(function(){return function(s){return Ev.default.createElement(X4.default,Sd({},s,{tickComponent:n,animationTrajectory:t}))}},[t,n]);return Ev.default.createElement(G4.default,Sd({},r,{ticksComponent:i}))}var tW=["AxisComponent"];function Nd(){return Nd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nd.apply(this,arguments)}function nW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function rW(e){var t,n,r,i,a,s,o,l=e.AxisComponent,u=nW(e,tW),c=_.useContext(Or),d=c.theme,f=c.xScale,g=c.yScale,p=c.margin,m=c.width,v=c.height,x=u.orientation,y=_.useMemo(function(){var E,T,C,O;return x==="left"||x==="right"?d==null||(E=d.axisStyles)==null||(T=E.y)==null?void 0:T[x]:d==null||(C=d.axisStyles)==null||(O=C.x)==null?void 0:O[x]},[d,x]),b=u.tickLabelProps,k=_.useMemo(function(){return b||y?function(E,T,C){return Nd({},y==null?void 0:y.tickLabel,{width:x==="left"||x==="right"?p==null?void 0:p[x]:void 0},typeof b=="function"?b(E,T,C):b)}:void 0},[b,y,x,p]),w=x==="bottom"?(v??0)-((t=p==null?void 0:p.bottom)!=null?t:0):x==="top"&&(n=p==null?void 0:p.top)!=null?n:0,S=x==="left"?(r=p==null?void 0:p.left)!=null?r:0:x==="right"?(m??0)-((i=p==null?void 0:p.right)!=null?i:0):0,N=x==="left"||x==="right"?g:f;return N?_.createElement(l,Nd({top:w,left:S,labelProps:y==null?void 0:y.axisLabel,stroke:y==null||(a=y.axisLine)==null?void 0:a.stroke,strokeWidth:y==null||(s=y.axisLine)==null?void 0:s.strokeWidth,tickLength:y==null?void 0:y.tickLength,tickStroke:y==null||(o=y.tickLine)==null?void 0:o.stroke},u,{tickLabelProps:k,scale:N})):null}function Cv(){return Cv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Cv.apply(this,arguments)}function ZE(e){return _.createElement(rW,Cv({AxisComponent:Y4},e))}var Mv={},Ed={};Ed.__esModule=!0,Ed.default=lW;var iW=QE(_),aW=QE(Zr),sW=["from","to","fill","className","innerRef"];function QE(e){return e&&e.__esModule?e:{default:e}}function jv(){return jv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jv.apply(this,arguments)}function oW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function lW(e){var t=e.from,n=t===void 0?{x:0,y:0}:t,r=e.to,i=r===void 0?{x:1,y:1}:r,a=e.fill,s=a===void 0?"transparent":a,o=e.className,l=e.innerRef,u=oW(e,sW),c=n.x===i.x||n.y===i.y;return iW.default.createElement("line",jv({ref:l,className:(0,aW.default)("visx-line",o),x1:n.x,y1:n.y,x2:i.x,y2:i.y,fill:s,shapeRendering:c?"crispEdges":"auto"},u))}var Td={};Td.__esModule=!0,Td.default=uW;function uW(e){return"bandwidth"in e?e.bandwidth():0}Mv.__esModule=!0,Mv.default=iT;var eT=Rl(yi),tT=Rl(_),cW=Rl(Zr),dW=Rl(Ed),fW=md,nT=Wc,rT=$l,hW=Rl(Td),pW=["top","left","scale","width","stroke","strokeWidth","strokeDasharray","className","children","numTicks","lineStyle","offset","tickValues"];function Rl(e){return e&&e.__esModule?e:{default:e}}function Ov(){return Ov=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ov.apply(this,arguments)}function gW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function iT(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.scale,s=e.width,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,d=e.strokeDasharray,f=e.className,g=e.children,p=e.numTicks,m=p===void 0?10:p,v=e.lineStyle,x=e.offset,y=e.tickValues,b=gW(e,pW),k=y??(0,rT.getTicks)(a,m),w=(x??0)+(0,hW.default)(a)/2,S=k.map(function(N,E){var T,C=((T=(0,rT.coerceNumber)(a(N)))!=null?T:0)+w;return{index:E,from:new nT.Point({x:0,y:C}),to:new nT.Point({x:s,y:C})}});return tT.default.createElement(fW.Group,{className:(0,cW.default)("visx-rows",f),top:n,left:i},g?g({lines:S}):S.map(function(N){var E=N.from,T=N.to,C=N.index;return tT.default.createElement(dW.default,Ov({key:"row-line-"+C,from:E,to:T,stroke:l,strokeWidth:c,strokeDasharray:d,style:v},b))}))}iT.propTypes={tickValues:eT.default.array,width:eT.default.number.isRequired};var Cd={};Cd.__esModule=!0,Cd.default=sT;var mW=Pv(yi),$v=Pv(_),aT=GE,vW=Pv(_d),yW=["scale","lines","animationTrajectory","animateXOrY","lineKey","lineStyle"];function Pv(e){return e&&e.__esModule?e:{default:e}}function Md(){return Md=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Md.apply(this,arguments)}function xW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function sT(e){var t=e.scale,n=e.lines,r=e.animationTrajectory,i=e.animateXOrY,a=e.lineKey,s=e.lineStyle,o=xW(e,yW),l=(0,aT.useTransition)(n,Md({},(0,vW.default)({scale:t,animateXOrY:i,animationTrajectory:r}),{key:a}));return $v.default.createElement($v.default.Fragment,null,l(function(u,c,d){var f=u.fromX,g=u.toX,p=u.fromY,m=u.toY,v=u.opacity,x=d.key;return $v.default.createElement(aT.animated.line,Md({key:x,x1:f,x2:g,y1:p,y2:m,strokeOpacity:v,style:s},o))}))}sT.propTypes={lineKey:mW.default.func.isRequired};var bW=NW,oT=Av(_),_W=Av(Mv),wW=Av(Cd),kW=["scale","width","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function Av(e){return e&&e.__esModule?e:{default:e}}function Lv(){return Lv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lv.apply(this,arguments)}function SW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function NW(e){var t=e.scale,n=e.width,r=e.numTicks,i=e.tickValues,a=e.offset,s=e.className,o=e.animationTrajectory,l=e.top,u=e.left,c=SW(e,kW);return oT.default.createElement(_W.default,{scale:t,width:n,numTicks:r,tickValues:i,className:s,top:l,left:u,offset:a},function(d){var f=d.lines;return oT.default.createElement(wW.default,Lv({scale:t,lines:f,animationTrajectory:o,animateXOrY:"y",lineKey:function(p){var m,v;return"row-"+((m=p==null||(v=p.from)==null?void 0:v.y)!=null?m:"")+"-"+p.index}},c))})}var Dv={};Dv.__esModule=!0,Dv.default=fT;var lT=Bl(yi),uT=Bl(_),EW=Bl(Zr),TW=Bl(Ed),CW=md,cT=Wc,dT=$l,MW=Bl(Td),jW=["top","left","scale","height","stroke","strokeWidth","strokeDasharray","className","numTicks","lineStyle","offset","tickValues","children"];function Bl(e){return e&&e.__esModule?e:{default:e}}function Iv(){return Iv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Iv.apply(this,arguments)}function OW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function fT(e){var t=e.top,n=t===void 0?0:t,r=e.left,i=r===void 0?0:r,a=e.scale,s=e.height,o=e.stroke,l=o===void 0?"#eaf0f6":o,u=e.strokeWidth,c=u===void 0?1:u,d=e.strokeDasharray,f=e.className,g=e.numTicks,p=g===void 0?10:g,m=e.lineStyle,v=e.offset,x=e.tickValues,y=e.children,b=OW(e,jW),k=x??(0,dT.getTicks)(a,p),w=(v??0)+(0,MW.default)(a)/2,S=k.map(function(N,E){var T,C=((T=(0,dT.coerceNumber)(a(N)))!=null?T:0)+w;return{index:E,from:new cT.Point({x:C,y:0}),to:new cT.Point({x:C,y:s})}});return uT.default.createElement(CW.Group,{className:(0,EW.default)("visx-columns",f),top:n,left:i},y?y({lines:S}):S.map(function(N){var E=N.from,T=N.to,C=N.index;return uT.default.createElement(TW.default,Iv({key:"column-line-"+C,from:E,to:T,stroke:l,strokeWidth:c,strokeDasharray:d,style:m},b))}))}fT.propTypes={tickValues:lT.default.array,height:lT.default.number.isRequired};var $W=IW,hT=Fv(_),PW=Fv(Dv),AW=Fv(Cd),LW=["scale","height","numTicks","tickValues","offset","className","animationTrajectory","top","left"];function Fv(e){return e&&e.__esModule?e:{default:e}}function zv(){return zv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zv.apply(this,arguments)}function DW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function IW(e){var t=e.scale,n=e.height,r=e.numTicks,i=e.tickValues,a=e.offset,s=e.className,o=e.animationTrajectory,l=e.top,u=e.left,c=DW(e,LW);return hT.default.createElement(PW.default,{scale:t,height:n,numTicks:r,tickValues:i,className:s,offset:a,top:l,left:u},function(d){var f=d.lines;return hT.default.createElement(AW.default,zv({scale:t,lines:f,animationTrajectory:o,animateXOrY:"x",lineKey:function(p){var m,v;return"column-"+((m=p==null||(v=p.from)==null?void 0:v.x)!=null?m:"")+"-"+p.index}},c))})}var FW=["rows","columns","GridRowsComponent","GridColumnsComponent"];function jd(){return jd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},jd.apply(this,arguments)}function zW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function pT(e){var t=e.rows,n=t===void 0?!0:t,r=e.columns,i=r===void 0?!0:r,a=e.GridRowsComponent,s=e.GridColumnsComponent,o=zW(e,FW),l=_.useContext(Or),u=l.theme,c=l.xScale,d=l.yScale,f=l.margin,g=l.innerWidth,p=l.innerHeight,m=u==null?void 0:u.gridStyles;return _.createElement(_.Fragment,null,n&&d&&g!=null&&_.createElement(a,jd({left:f==null?void 0:f.left,lineStyle:m,width:g,scale:d},o)),i&&c&&p!=null&&_.createElement(s,jd({top:f==null?void 0:f.top,lineStyle:m,height:p,scale:c},o)))}pT.propTypes={rows:V.bool,columns:V.bool};var RW=["animationTrajectory"];function Wl(){return Wl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wl.apply(this,arguments)}function BW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function WW(e){var t=e.animationTrajectory,n=BW(e,RW),r=_.useMemo(function(){return function(s){return _.createElement(bW,Wl({},s,{animationTrajectory:t}))}},[t]),i=_.useMemo(function(){return function(s){return _.createElement($W,Wl({},s,{animationTrajectory:t}))}},[t]);return _.createElement(pT,Wl({GridRowsComponent:r,GridColumnsComponent:i},n))}var UW=["tooltipOpen"];function HW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function Od(){return Od=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Od.apply(this,arguments)}function qW(e){var t=_.useState(Od({tooltipOpen:!1},e)),n=t[0],r=t[1],i=_.useCallback(function(s){return r(typeof s=="function"?function(o){o.tooltipOpen;var l=HW(o,UW);return Od({},s(l),{tooltipOpen:!0})}:{tooltipOpen:!0,tooltipLeft:s.tooltipLeft,tooltipTop:s.tooltipTop,tooltipData:s.tooltipData})},[r]),a=_.useCallback(function(){return r({tooltipOpen:!1,tooltipLeft:void 0,tooltipTop:void 0,tooltipData:void 0})},[r]);return{tooltipOpen:n.tooltipOpen,tooltipLeft:n.tooltipLeft,tooltipTop:n.tooltipTop,tooltipData:n.tooltipData,updateTooltip:r,showTooltip:i,hideTooltip:a}}function VW(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Rv(e,t)}function Rv(e,t){return Rv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Rv(e,t)}var gT=function(e){VW(t,e);function t(){return e.apply(this,arguments)||this}var n=t.prototype;return n.componentWillUnmount=function(){this.node&&document.body&&(document.body.removeChild(this.node),delete this.node)},n.render=function(){return!this.node&&typeof document<"u"&&(this.node=document.createElement("div"),this.props.zIndex!=null&&(this.node.style.zIndex=""+this.props.zIndex),document.body.append(this.node)),this.node?xn.createPortal(this.props.children,this.node):null},t}(_.PureComponent);gT.propTypes={zIndex:V.oneOfType([V.number,V.string])};var KW=["className","top","left","offsetLeft","offsetTop","style","children","unstyled","applyPositionStyle"];function $d(){return $d=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},$d.apply(this,arguments)}function YW(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Bv={position:"absolute",backgroundColor:"white",color:"#666666",padding:".3rem .5rem",borderRadius:"3px",fontSize:"14px",boxShadow:"0 1px 2px rgba(33,33,33,0.2)",lineHeight:"1em",pointerEvents:"none"},Pd=_.forwardRef(function(e,t){var n=e.className,r=e.top,i=e.left,a=e.offsetLeft,s=a===void 0?10:a,o=e.offsetTop,l=o===void 0?10:o,u=e.style,c=u===void 0?Bv:u,d=e.children,f=e.unstyled,g=f===void 0?!1:f,p=e.applyPositionStyle,m=p===void 0?!1:p,v=YW(e,KW);return _.createElement("div",$d({ref:t,className:$e("visx-tooltip",n),style:$d({top:r==null||l==null?r:r+l,left:i==null||s==null?i:i+s},m&&{position:"absolute"},!g&&c)},v),d)});Pd.propTypes={children:V.node,className:V.string,left:V.number,offsetLeft:V.number,offsetTop:V.number,top:V.number,applyPositionStyle:V.bool,unstyled:V.bool},Pd.displayName="Tooltip";function Wv(){return Wv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Wv.apply(this,arguments)}function GW(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function XW(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,Uv(e,t)}function Uv(e,t){return Uv=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,i){return r.__proto__=i,r},Uv(e,t)}var mT={top:0,right:0,bottom:0,left:0,width:0,height:0};function JW(e){var t;return t=function(n){XW(r,n);function r(a){var s;return s=n.call(this,a)||this,s.state={rect:void 0,parentRect:void 0},s.nodeRef=_.createRef(),s.getRects=s.getRects.bind(GW(s)),s}var i=r.prototype;return i.componentDidMount=function(){var s,o=this;this.node=(s=this.nodeRef)!=null&&s.current?this.nodeRef.current:xn.findDOMNode(this),this.setState(function(){return o.getRects()})},i.getRects=function(){if(!this.node)return this.state;var s=this.node,o=s.parentNode,l=s.getBoundingClientRect?s.getBoundingClientRect():mT,u=o!=null&&o.getBoundingClientRect?o.getBoundingClientRect():mT;return{rect:l,parentRect:u}},i.render=function(){return _.createElement(e,Wv({nodeRef:this.nodeRef,getRects:this.getRects},this.state,this.props))},r}(_.PureComponent),t.displayName="withBoundingRects("+(e.displayName||"")+")",t}var vT=_.createContext({isFlippedVertically:!1,isFlippedHorizontally:!1}),ZW=vT.Provider;vT.Consumer;var QW=["children","getRects","left","offsetLeft","offsetTop","parentRect","rect","style","top","unstyled","nodeRef"];function Ad(){return Ad=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ad.apply(this,arguments)}function e8(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function yT(e){var t=e.children;e.getRects;var n=e.left,r=n===void 0?0:n,i=e.offsetLeft,a=i===void 0?10:i,s=e.offsetTop,o=s===void 0?10:s,l=e.parentRect,u=e.rect,c=e.style,d=c===void 0?Bv:c,f=e.top,g=f===void 0?0:f,p=e.unstyled,m=p===void 0?!1:p,v=e.nodeRef,x=e8(e,QW),y,b=!1,k=!1;if(u&&l){var w=r,S=g;if(l.width){var N=w+a+u.width-l.width,E=u.width-w-a;b=N>0&&N>E}else{var T=w+a+u.width-window.innerWidth,C=u.width-w-a;b=T>0&&T>C}if(l.height){var O=S+o+u.height-l.height,$=u.height-S-o;k=O>0&&O>$}else k=S+o+u.height>window.innerHeight;w=b?w-u.width-a:w+a,S=k?S-u.height-o:S+o,w=Math.round(w),S=Math.round(S),y="translate("+w+"px, "+S+"px)"}return _.createElement(Pd,Ad({ref:v,style:Ad({left:0,top:0,transform:y},!m&&d)},x),_.createElement(ZW,{value:{isFlippedVertically:!k,isFlippedHorizontally:!b}},t))}yT.propTypes={nodeRef:V.oneOfType([V.string,V.func,V.object])};const t8=JW(yT);var n8=["detectBounds","zIndex"],r8=["left","top","detectBounds","zIndex"];function Hv(){return Hv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hv.apply(this,arguments)}function xT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function i8(e){var t=e===void 0?{}:e,n=t.detectBounds,r=n===void 0?!0:n,i=t.zIndex,a=xT(t,n8),s=xB(a),o=s[0],l=s[1],u=s[2],c=_.useState(!1),d=c[0],f=c[1];_.useEffect(function(){f(!1)},[]);var g=_.useMemo(function(){return function(p){var m=p.left,v=m===void 0?0:m,x=p.top,y=x===void 0?0:x,b=p.detectBounds,k=p.zIndex,w=xT(p,r8),S=b??r,N=k??i,E=S?t8:Pd,T=d?0:window.scrollX,C=d?0:window.scrollY,O=v+(l.left||0)+T,$=y+(l.top||0)+C;return _.createElement(gT,{zIndex:N},_.createElement(E,Hv({left:O,top:$},w)))}},[r,i,l.left,l.top,d]);return{containerRef:o,containerBounds:l,forceRefreshBounds:u,TooltipInPortal:g}}var Ul=_.createContext(null),a8=["debounce","detectBounds","horizontalCrosshairStyle","glyphStyle","renderTooltip","renderGlyph","resizeObserverPolyfill","scroll","showDatumGlyph","showHorizontalCrosshair","showSeriesGlyphs","showVerticalCrosshair","snapTooltipToDatumX","snapTooltipToDatumY","verticalCrosshairStyle","zIndex"],s8=["x","y"];function bT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function si(){return si=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},si.apply(this,arguments)}var qv={position:"absolute",pointerEvents:"none",fontSize:0,lineHeight:0},o8={position:"absolute",left:0,top:0,opacity:0,width:0,height:0,pointerEvents:"none"};function _T(e){var t=_.useContext(Or)||{},n=t.theme;return _.createElement("circle",si({cx:e.x,cy:e.y,r:e.size,fill:e.color,stroke:n==null?void 0:n.backgroundColor,strokeWidth:1.5,paintOrder:"fill"},e.glyphStyle))}_T.propTypes={isNearestDatum:V.bool.isRequired};function l8(e){return _.createElement(_T,e)}function wT(e){var t,n,r,i,a,s,o,l,u,c,d,f,g,p=e.debounce,m=e.detectBounds,v=e.horizontalCrosshairStyle,x=e.glyphStyle,y=e.renderTooltip,b=e.renderGlyph,k=b===void 0?l8:b,w=e.resizeObserverPolyfill,S=e.scroll,N=S===void 0?!0:S,E=e.showDatumGlyph,T=E===void 0?!1:E,C=e.showHorizontalCrosshair,O=C===void 0?!1:C,$=e.showSeriesGlyphs,M=$===void 0?!1:$,j=e.showVerticalCrosshair,P=j===void 0?!1:j,F=e.snapTooltipToDatumX,B=F===void 0?!1:F,W=e.snapTooltipToDatumY,q=W===void 0?!1:W,D=e.verticalCrosshairStyle,A=e.zIndex,U=bT(e,a8),Y=_.useContext(Or)||{},G=Y.colorScale,J=Y.theme,R=Y.innerHeight,K=Y.innerWidth,Z=Y.margin,z=Y.xScale,X=Y.yScale,H=Y.dataRegistry,I=Y.resizeObserverPolyfill,ne=_.useContext(Ul),ue=i8({debounce:p,detectBounds:m,polyfill:I||w,scroll:N,zIndex:A}),ye=ue.containerRef,fe=ue.TooltipInPortal,xe=ue.forceRefreshBounds,Se=_.useCallback(function(st){var Jt;ye((Jt=st==null?void 0:st.parentElement)!=null?Jt:null)},[ye]),We=ne!=null&&ne.tooltipOpen?y(si({},ne,{colorScale:G})):null,Ze=(ne==null?void 0:ne.tooltipOpen)&&We!=null,Nt=_.useRef(!1);_.useEffect(function(){Ze&&!Nt.current&&xe(),Nt.current=Ze},[Ze,xe]);var Ve=ne==null?void 0:ne.tooltipLeft,Qe=ne==null?void 0:ne.tooltipTop,mt=z?Cm(z):0,ht=X?Cm(X):0,vt=_.useCallback(function(st,Jt){var jn,Yn,Ht=H==null?void 0:H.get(st),hr=Ht==null?void 0:Ht.xAccessor,te=Ht==null?void 0:Ht.yAccessor,Ge=z&&hr?(jn=Number(z(hr(Jt)))+mt/2)!=null?jn:0:void 0,ot=X&&te?(Yn=Number(X(te(Jt)))+ht/2)!=null?Yn:0:void 0;return{left:Ge,top:ot}},[H,mt,ht,z,X]),Le=ne==null||(t=ne.tooltipData)==null?void 0:t.nearestDatum,Et=(n=Le==null?void 0:Le.key)!=null?n:"";if(Ze&&Le&&(B||q)){var Tt=vt(Et,Le.datum),at=Tt.left,fr=Tt.top;Ve=B&&pn(at)?at:Ve,Qe=q&&pn(fr)?fr:Qe}var Mn=[];if(Ze&&(T||M)){var Ut,me=Number((Ut=x==null?void 0:x.radius)!=null?Ut:4);if(M){var Ie,Ct;Object.values((Ie=ne==null||(Ct=ne.tooltipData)==null?void 0:Ct.datumByKey)!=null?Ie:{}).forEach(function(st){var Jt,jn,Yn,Ht=st.key,hr=st.datum,te=st.index,Ge=(Jt=(jn=G==null?void 0:G(Ht))!=null?jn:J==null||(Yn=J.htmlLabel)==null?void 0:Yn.color)!=null?Jt:"#222",ot=vt(Ht,hr),pr=ot.left,L=ot.top;!pn(pr)||!pn(L)||Mn.push({key:Ht,color:Ge,datum:hr,index:te,size:me,x:pr,y:L,glyphStyle:x,isNearestDatum:Le?Le.key===Ht:!1})})}else if(Le){var bt=vt(Et,Le.datum),re=bt.left,ve=bt.top;if(pn(re)&&pn(ve)){var ge,Ne,pt,Mt,un,Oa,jt=(ge=(Ne=(pt=(Mt=Et&&(G==null?void 0:G(Et)))!=null?Mt:null)!=null?pt:J==null||(un=J.gridStyles)==null?void 0:un.stroke)!=null?Ne:J==null||(Oa=J.htmlLabel)==null?void 0:Oa.color)!=null?ge:"#222";Mn.push({key:Et,color:jt,datum:Le.datum,index:Le.index,size:me,x:re,y:ve,glyphStyle:x,isNearestDatum:!0})}}}return _.createElement(_.Fragment,null,_.createElement("svg",{ref:Se,style:o8}),Ze&&_.createElement(_.Fragment,null,P&&_.createElement(fe,{className:"visx-crosshair visx-crosshair-vertical",left:Ve,top:Z==null?void 0:Z.top,offsetLeft:0,offsetTop:0,detectBounds:!1,style:qv},_.createElement("svg",{width:"1",height:R,overflow:"visible"},_.createElement("line",si({x1:0,x2:0,y1:0,y2:R,strokeWidth:1.5,stroke:(r=(i=J==null||(a=J.gridStyles)==null?void 0:a.stroke)!=null?i:J==null||(s=J.htmlLabel)==null?void 0:s.color)!=null?r:"#222"},D)))),O&&_.createElement(fe,{className:"visx-crosshair visx-crosshair-horizontal",left:Z==null?void 0:Z.left,top:Qe,offsetLeft:0,offsetTop:0,detectBounds:!1,style:qv},_.createElement("svg",{width:K,height:"1",overflow:"visible"},_.createElement("line",si({x1:0,x2:K,y1:0,y2:0,strokeWidth:1.5,stroke:(o=(l=J==null||(u=J.gridStyles)==null?void 0:u.stroke)!=null?l:J==null||(c=J.htmlLabel)==null?void 0:c.color)!=null?o:"#222"},v)))),Mn.map(function(st,Jt){var jn=st.x,Yn=st.y,Ht=bT(st,s8);return _.createElement(fe,{key:Jt,className:"visx-tooltip-glyph",left:jn,top:Yn,offsetLeft:0,offsetTop:0,detectBounds:!1,style:qv},_.createElement("svg",{overflow:"visible"},k(si({x:0,y:0},Ht))))}),_.createElement(fe,si({left:Ve,top:Qe,style:si({},Bv,{background:(d=J==null?void 0:J.backgroundColor)!=null?d:"white",boxShadow:"0 1px 2px "+(J!=null&&(f=J.htmlLabel)!=null&&f.color?(J==null||(g=J.htmlLabel)==null?void 0:g.color)+"55":"#22222255")},J==null?void 0:J.htmlLabel)},U),We)))}wT.propTypes={renderTooltip:V.func.isRequired,renderGlyph:V.func,snapTooltipToDatumX:V.bool,snapTooltipToDatumY:V.bool,showVerticalCrosshair:V.bool,showHorizontalCrosshair:V.bool,showDatumGlyph:V.bool,showSeriesGlyphs:V.bool};function kT(e){var t=_.useContext(Ul);return t!=null&&t.tooltipOpen?_.createElement(wT,e):null}kT.propTypes={renderTooltip:V.func.isRequired,renderGlyph:V.func,snapTooltipToDatumX:V.bool,snapTooltipToDatumY:V.bool,showVerticalCrosshair:V.bool,showHorizontalCrosshair:V.bool,showDatumGlyph:V.bool,showSeriesGlyphs:V.bool};var Vv={},u8=Ac,c8=function(){return u8.Date.now()},d8=c8,f8=/\s/;function h8(e){for(var t=e.length;t--&&f8.test(e.charAt(t)););return t}var p8=h8,g8=p8,m8=/^\s+/;function v8(e){return e&&e.slice(0,g8(e)+1).replace(m8,"")}var y8=v8;function x8(e){return e!=null&&typeof e=="object"}var b8=x8,_8=pN,w8=b8,k8="[object Symbol]";function S8(e){return typeof e=="symbol"||w8(e)&&_8(e)==k8}var N8=S8,E8=y8,ST=Lc,T8=N8,NT=NaN,C8=/^[-+]0x[0-9a-f]+$/i,M8=/^0b[01]+$/i,j8=/^0o[0-7]+$/i,O8=parseInt;function $8(e){if(typeof e=="number")return e;if(T8(e))return NT;if(ST(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=ST(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=E8(e);var n=M8.test(e);return n||j8.test(e)?O8(e.slice(2),n?2:8):C8.test(e)?NT:+e}var P8=$8,A8=Lc,Kv=d8,ET=P8,L8="Expected a function",D8=Math.max,I8=Math.min;function F8(e,t,n){var r,i,a,s,o,l,u=0,c=!1,d=!1,f=!0;if(typeof e!="function")throw new TypeError(L8);t=ET(t)||0,A8(n)&&(c=!!n.leading,d="maxWait"in n,a=d?D8(ET(n.maxWait)||0,t):a,f="trailing"in n?!!n.trailing:f);function g(S){var N=r,E=i;return r=i=void 0,u=S,s=e.apply(E,N),s}function p(S){return u=S,o=setTimeout(x,t),c?g(S):s}function m(S){var N=S-l,E=S-u,T=t-N;return d?I8(T,a-E):T}function v(S){var N=S-l,E=S-u;return l===void 0||N>=t||N<0||d&&E>=a}function x(){var S=Kv();if(v(S))return y(S);o=setTimeout(x,m(S))}function y(S){return o=void 0,f&&r?g(S):(r=i=void 0,s)}function b(){o!==void 0&&clearTimeout(o),u=0,r=l=i=o=void 0}function k(){return o===void 0?s:y(Kv())}function w(){var S=Kv(),N=v(S);if(r=arguments,i=this,l=S,N){if(o===void 0)return p(l);if(d)return clearTimeout(o),o=setTimeout(x,t),g(l)}return o===void 0&&(o=setTimeout(x,t)),s}return w.cancel=b,w.flush=k,w}var TT=F8;const CT=qs(TT);Vv.__esModule=!0,Vv.default=W8;var z8=R8(TT),Hl=_;function R8(e){return e&&e.__esModule?e:{default:e}}function Ld(){return Ld=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ld.apply(this,arguments)}var B8=[],MT={width:0,height:0,top:0,left:0};function W8(e){var t=e===void 0?{}:e,n=t.initialSize,r=n===void 0?MT:n,i=t.debounceTime,a=i===void 0?300:i,s=t.ignoreDimensions,o=s===void 0?B8:s,l=t.enableDebounceLeadingCall,u=l===void 0?!0:l,c=t.resizeObserverPolyfill,d=(0,Hl.useRef)(null),f=(0,Hl.useRef)(0),g=(0,Hl.useState)(Ld({},MT,r)),p=g[0],m=g[1],v=(0,Hl.useMemo)(function(){var x=Array.isArray(o)?o:[o];return(0,z8.default)(function(y){m(function(b){var k=Object.keys(b),w=k.filter(function(N){return b[N]!==y[N]}),S=w.every(function(N){return x.includes(N)});return S?b:y})},a,{leading:u})},[a,u,o]);return(0,Hl.useEffect)(function(){var x=c||window.ResizeObserver,y=new x(function(b){b.forEach(function(k){var w,S=(w=k==null?void 0:k.contentRect)!=null?w:{},N=S.left,E=S.top,T=S.width,C=S.height;f.current=window.requestAnimationFrame(function(){v({width:T,height:C,top:E,left:N})})})});return d.current&&y.observe(d.current),function(){window.cancelAnimationFrame(f.current),y.disconnect(),v.cancel()}},[v,c]),Ld({parentRef:d,resize:v},p)}var U8=$T,jT=Yv(yi),H8=Yv(_),q8=Yv(Vv),V8=["className","children","debounceTime","ignoreDimensions","initialSize","parentSizeStyles","enableDebounceLeadingCall","resizeObserverPolyfill"],K8=["parentRef","resize"];function Yv(e){return e&&e.__esModule?e:{default:e}}function Dd(){return Dd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Dd.apply(this,arguments)}function OT(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}var Y8={width:"100%",height:"100%"};function $T(e){var t=e.className,n=e.children,r=e.debounceTime,i=e.ignoreDimensions,a=e.initialSize,s=e.parentSizeStyles,o=s===void 0?Y8:s,l=e.enableDebounceLeadingCall,u=l===void 0?!0:l,c=e.resizeObserverPolyfill,d=OT(e,V8),f=(0,q8.default)({initialSize:a,debounceTime:r,ignoreDimensions:i,enableDebounceLeadingCall:u,resizeObserverPolyfill:c}),g=f.parentRef,p=f.resize,m=OT(f,K8);return H8.default.createElement("div",Dd({style:o,ref:g,className:t},d),n(Dd({},m,{ref:g.current,resize:p})))}$T.propTypes={className:jT.default.string,children:jT.default.func.isRequired};var PT=_.createContext(null);function Ai(e,t,n){var r=_.useContext(PT),i=_.useRef();i.current=n;var a=_.useCallback(function(s,o,l){r&&r.emit(s,{event:o,svgPoint:NN(o),source:l})},[r]);return _.useEffect(function(){if(r&&e&&t){var s=function(l){var u;(!i.current||l!=null&&l.source&&(u=i.current)!=null&&u.includes(l.source))&&t(l)};return r.on(e,s),function(){return r==null?void 0:r.off(e,s)}}},[r,e,t]),r?a:null}function G8(e){return{all:e=e||new Map,on:function(t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])},off:function(t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)},emit:function(t,n){(e.get(t)||[]).slice().map(function(r){r(n)}),(e.get("*")||[]).slice().map(function(r){r(t,n)})}}}function X8(e){var t=e.children,n=_.useMemo(function(){return G8()},[]);return _.createElement(PT.Provider,{value:n},t)}function Gv(){return Gv=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gv.apply(this,arguments)}function AT(e){var t=e.hideTooltipDebounceMs,n=t===void 0?400:t,r=e.children,i=qW(void 0),a=i.tooltipOpen,s=i.tooltipLeft,o=i.tooltipTop,l=i.tooltipData,u=i.updateTooltip,c=i.hideTooltip,d=_.useRef(null);function f(){d.current&&(d.current.cancel(),d.current=null)}_.useEffect(function(){return f},[]);var g=_.useRef(function(v){var x=v.svgPoint,y=v.index,b=v.key,k=v.datum,w=v.distanceX,S=v.distanceY;f();var N=pn(w)?w:1/0,E=pn(S)?S:1/0,T=Math.sqrt(Math.pow(N,2)+Math.pow(E,2));u(function(C){var O,$,M,j=C.tooltipData,P=j!=null&&j.nearestDatum&&pn(j.nearestDatum.distance)?j.nearestDatum.distance:1/0;return{tooltipOpen:!0,tooltipLeft:x==null?void 0:x.x,tooltipTop:x==null?void 0:x.y,tooltipData:{nearestDatum:((O=j==null||($=j.nearestDatum)==null?void 0:$.key)!=null?O:"")!==b&&P<T?j==null?void 0:j.nearestDatum:{key:b,index:y,datum:k,distance:T},datumByKey:Gv({},j==null?void 0:j.datumByKey,(M={},M[b]={datum:k,index:y,key:b},M))}}})}),p=_.useCallback(function(){d.current=CT(c,n),d.current()},[c,n]),m=_.useMemo(function(){return{tooltipOpen:a,tooltipLeft:s,tooltipTop:o,tooltipData:l,updateTooltip:u,showTooltip:g.current,hideTooltip:p}},[p,l,s,a,o,u]);return _.createElement(Ul.Provider,{value:m},r)}AT.propTypes={hideTooltipDebounceMs:V.number,children:V.node.isRequired};const J8=Gn(tD);var ql={},Xv={};Xv.__esModule=!0,Xv.default=Z8;function Z8(e,t){t.domain&&("nice"in e||"quantiles"in e||"padding"in e,e.domain(t.domain))}var Jv={};Jv.__esModule=!0,Jv.default=Q8;function Q8(e,t){t.range&&("padding"in e,e.range(t.range))}var Zv={};Zv.__esModule=!0,Zv.default=eU;function eU(e,t){"align"in e&&"align"in t&&typeof t.align<"u"&&e.align(t.align)}var Qv={};Qv.__esModule=!0,Qv.default=tU;function tU(e,t){"base"in e&&"base"in t&&typeof t.base<"u"&&e.base(t.base)}var ey={};ey.__esModule=!0,ey.default=nU;function nU(e,t){"clamp"in e&&"clamp"in t&&typeof t.clamp<"u"&&e.clamp(t.clamp)}var ty={};ty.__esModule=!0,ty.default=rU;function rU(e,t){"constant"in e&&"constant"in t&&typeof t.constant<"u"&&e.constant(t.constant)}var ny={};ny.__esModule=!0,ny.default=iU;function iU(e,t){"exponent"in e&&"exponent"in t&&typeof t.exponent<"u"&&e.exponent(t.exponent)}var ry={},iy={};const LT=Gn(uD);iy.__esModule=!0,iy.default=aU;var Li=LT,DT={lab:Li.interpolateLab,hcl:Li.interpolateHcl,"hcl-long":Li.interpolateHclLong,hsl:Li.interpolateHsl,"hsl-long":Li.interpolateHslLong,cubehelix:Li.interpolateCubehelix,"cubehelix-long":Li.interpolateCubehelixLong,rgb:Li.interpolateRgb};function aU(e){switch(e){case"lab":case"hcl":case"hcl-long":case"hsl":case"hsl-long":case"cubehelix":case"cubehelix-long":case"rgb":return DT[e]}var t=e.type,n=e.gamma,r=DT[t];return typeof n>"u"?r:r.gamma(n)}ry.__esModule=!0,ry.default=lU;var sU=oU(iy);function oU(e){return e&&e.__esModule?e:{default:e}}function lU(e,t){if("interpolate"in t&&"interpolate"in e&&typeof t.interpolate<"u"){var n=(0,sU.default)(t.interpolate);e.interpolate(n)}}var ay={};const uU=Gn(fD);var sy={};sy.__esModule=!0,sy.default=fU;var cU=new Date(Date.UTC(2020,1,2,3,4,5)),dU="%Y-%m-%d %H:%M";function fU(e){var t=e.tickFormat(1,dU)(cU);return t==="2020-02-02 03:04"}ay.__esModule=!0,ay.default=gU;var vn=uU,hU=pU(sy);function pU(e){return e&&e.__esModule?e:{default:e}}var IT={day:vn.timeDay,hour:vn.timeHour,minute:vn.timeMinute,month:vn.timeMonth,second:vn.timeSecond,week:vn.timeWeek,year:vn.timeYear},FT={day:vn.utcDay,hour:vn.utcHour,minute:vn.utcMinute,month:vn.utcMonth,second:vn.utcSecond,week:vn.utcWeek,year:vn.utcYear};function gU(e,t){if("nice"in t&&typeof t.nice<"u"&&"nice"in e){var n=t.nice;if(typeof n=="boolean")n&&e.nice();else if(typeof n=="number")e.nice(n);else{var r=e,i=(0,hU.default)(r);if(typeof n=="string")r.nice(i?FT[n]:IT[n]);else{var a=n.interval,s=n.step,o=(i?FT[a]:IT[a]).every(s);o!=null&&r.nice(o)}}}}var oy={};oy.__esModule=!0,oy.default=mU;function mU(e,t){"padding"in e&&"padding"in t&&typeof t.padding<"u"&&e.padding(t.padding),"paddingInner"in e&&"paddingInner"in t&&typeof t.paddingInner<"u"&&e.paddingInner(t.paddingInner),"paddingOuter"in e&&"paddingOuter"in t&&typeof t.paddingOuter<"u"&&e.paddingOuter(t.paddingOuter)}var ly={};ly.__esModule=!0,ly.default=vU;function vU(e,t){if(t.reverse){var n=e.range().slice().reverse();"padding"in e,e.range(n)}}var uy={};uy.__esModule=!0,uy.default=xU;var yU=LT;function xU(e,t){"round"in t&&typeof t.round<"u"&&(t.round&&"interpolate"in t&&typeof t.interpolate<"u"?console.warn("[visx/scale/applyRound] ignoring round: scale config contains round and interpolate. only applying interpolate. config:",t):"round"in e?e.round(t.round):"interpolate"in e&&t.round&&e.interpolate(yU.interpolateRound))}var cy={};cy.__esModule=!0,cy.default=bU;function bU(e,t){"unknown"in e&&"unknown"in t&&typeof t.unknown<"u"&&e.unknown(t.unknown)}var dy={};dy.__esModule=!0,dy.default=_U;function _U(e,t){if("zero"in t&&t.zero===!0){var n=e.domain(),r=n[0],i=n[1],a=i<r,s=a?[i,r]:[r,i],o=s[0],l=s[1],u=[Math.min(0,o),Math.max(0,l)];e.domain(a?u.reverse():u)}}ql.__esModule=!0,ql.ALL_OPERATORS=void 0,ql.default=IU;var wU=yn(Xv),kU=yn(Jv),SU=yn(Zv),NU=yn(Qv),EU=yn(ey),TU=yn(ty),CU=yn(ny),MU=yn(ry),jU=yn(ay),OU=yn(oy),$U=yn(ly),PU=yn(uy),AU=yn(cy),LU=yn(dy);function yn(e){return e&&e.__esModule?e:{default:e}}var zT=["domain","nice","zero","interpolate","round","range","reverse","align","base","clamp","constant","exponent","padding","unknown"];ql.ALL_OPERATORS=zT;var DU={domain:wU.default,nice:jU.default,zero:LU.default,interpolate:MU.default,round:PU.default,align:SU.default,base:NU.default,clamp:EU.default,constant:TU.default,exponent:CU.default,padding:OU.default,range:kU.default,reverse:$U.default,unknown:AU.default};function IU(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=new Set(t),i=zT.filter(function(a){return r.has(a)});return function(s,o){return typeof o<"u"&&i.forEach(function(l){DU[l](s,o)}),s}}var FU=UU,zU=J8,RU=BU(ql);function BU(e){return e&&e.__esModule?e:{default:e}}var WU=(0,RU.default)("domain","range","reverse","unknown");function UU(e){return WU((0,zU.scaleOrdinal)(),e)}var Di={red:["#fff5f5","#ffe3e3","#ffc9c9","#ffa8a8","#ff8787","#ff6b6b","#fa5252","#f03e3e","#e03131","#c92a2a"],pink:["#fff0f6","#ffdeeb","#fcc2d7","#faa2c1","#f783ac","#f06595","#e64980","#d6336c","#c2255c","#a61e4d"],grape:["#f8f0fc","#f3d9fa","#eebefa","#e599f7","#da77f2","#cc5de8","#be4bdb","#ae3ec9","#9c36b5","#862e9c"],cyan:["#e3fafc","#c5f6fa","#99e9f2","#66d9e8","#3bc9db","#22b8cf","#15aabf","#1098ad","#0c8599","#0b7285"],yellow:["#fff9db","#fff3bf","#ffec99","#ffe066","#ffd43b","#fcc419","#fab005","#f59f00","#f08c00","#e67700"],gray:["#f8f9fa","#f1f3f5","#e9ecef","#dee2e6","#ced4da","#adb5bd","#868e96","#495057","#343a40","#212529"]},Vl=Di.gray,fy=Vl[7],HU=[Di.cyan[9],Di.cyan[3],Di.yellow[5],Di.red[4],Di.grape[8],Di.grape[5],Di.pink[9]];function it(){return it=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},it.apply(this,arguments)}var hy={fontFamily:"-apple-system,BlinkMacSystemFont,Roboto,Helvetica Neue,sans-serif",fontWeight:700,fontSize:12,textAnchor:"middle",pointerEvents:"none",letterSpacing:.4};function qU(e){var t,n,r,i,a,s,o=it({},hy,{fill:fy,stroke:"none"},e.svgLabelBig),l=it({},hy,{fontWeight:200,fontSize:11,fill:fy,stroke:"none"},e.svgLabelSmall),u=it({color:(t=(n=(r=(i=e.htmlLabel)==null?void 0:i.color)!=null?r:(a=e.svgLabelBig)==null?void 0:a.fill)!=null?n:(s=e.svgLabelSmall)==null?void 0:s.fill)!=null?t:fy},hy,e.htmlLabel);return{backgroundColor:e.backgroundColor,colors:[].concat(e.colors),htmlLabel:it({},u),svgLabelSmall:it({},l),svgLabelBig:it({},o),gridStyles:it({stroke:e.gridColor,strokeWidth:1},e.gridStyles),axisStyles:{x:{top:{axisLabel:it({},o,{dy:"-0.25em"}),axisLine:it({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:it({},l,{dy:"-0.25em"}),tickLength:e.tickLength,tickLine:it({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)},bottom:{axisLabel:it({},o,{dy:"-0.25em"}),axisLine:it({stroke:e.gridColorDark,strokeWidth:2},e.xAxisLineStyles),tickLabel:it({},l,{dy:"0.125em"}),tickLength:e.tickLength,tickLine:it({strokeWidth:1,stroke:e.gridColor},e.xTickLineStyles)}},y:{left:{axisLabel:it({},o,{dx:"-1.25em"}),axisLine:it({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:it({},l,{textAnchor:"end",dx:"-0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:it({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)},right:{axisLabel:it({},o,{dx:"1.25em"}),axisLine:it({stroke:e.gridColor,strokeWidth:1},e.yAxisLineStyles),tickLabel:it({},l,{textAnchor:"start",dx:"0.25em",dy:"0.25em"}),tickLength:e.tickLength,tickLine:it({strokeWidth:1,stroke:e.gridColor},e.yTickLineStyles)}}}}}const VU=qU({backgroundColor:"#fff",colors:HU,tickLength:4,svgLabelSmall:{fill:Vl[7]},svgLabelBig:{fill:Vl[9]},gridColor:Vl[5],gridColorDark:Vl[9]});var KU=_.createContext(VU),YU=function(){function e(){this.registry={},this.registryKeys=[]}var t=e.prototype;return t.registerData=function(r){var i=this,a=Array.isArray(r)?r:[r];a.forEach(function(s){s.key in i.registry&&i.registry[s.key]!=null&&console.debug("Overriding data registry key",s.key),i.registry[s.key]=s,i.registryKeys=Object.keys(i.registry)})},t.unregisterData=function(r){var i=this,a=Array.isArray(r)?r:[r];a.forEach(function(s){delete i.registry[s],i.registryKeys=Object.keys(i.registry)})},t.entries=function(){return Object.values(this.registry)},t.get=function(r){return this.registry[r]},t.keys=function(){return this.registryKeys},e}();function GU(){var e=_.useState(Math.random()),t=e[1],n=_.useMemo(function(){return new YU},[]);return _.useMemo(function(){return{registerData:function(){n.registerData.apply(n,arguments),t(Math.random())},unregisterData:function(){n.unregisterData.apply(n,arguments),t(Math.random())},entries:function(){return n.entries()},get:function(i){return n.get(i)},keys:function(){return n.keys()}}},[n])}var py={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}};function XU(e){var t=_.useState({width:(e==null?void 0:e.width)==null?py.width:e.width,height:(e==null?void 0:e.height)==null?py.height:e.height,margin:(e==null?void 0:e.margin)==null?py.margin:e.margin}),n=t[0],r=t[1],i=_.useCallback(function(a){(a.width!==n.width||a.height!==n.height||a.margin.left!==n.margin.left||a.margin.right!==n.margin.right||a.margin.top!==n.margin.top||a.margin.bottom!==n.margin.bottom)&&r(a)},[n.width,n.height,n.margin.left,n.margin.right,n.margin.bottom,n.margin.top]);return[n,i]}function gy(e){return(e==null?void 0:e.type)==="band"||(e==null?void 0:e.type)==="ordinal"||(e==null?void 0:e.type)==="point"}function Rs(){return Rs=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Rs.apply(this,arguments)}function JU(e){var t=e.dataRegistry,n=e.xRange,r=e.xScaleConfig,i=e.yRange,a=e.yScaleConfig,s=t.keys(),o=n[0],l=n[1],u=i[0],c=i[1],d=_.useMemo(function(){var g=s.map(function(x){return t.get(x)}),p=g.reduce(function(x,y){return y?x.concat(y.data.map(function(b){return y.xAccessor(b)})):x},[]);if(p.length!==0){var m=gy(r)?p:c_(p),v=qp(r)?Zo(Rs({range:[o,l],domain:m,zero:!0},r)):Zo(Rs({range:[o,l],domain:m},r));return g.forEach(function(x){x!=null&&x.xScale&&(v=x.xScale(v))}),v}},[t,r,s,o,l]),f=_.useMemo(function(){var g=s.map(function(x){return t.get(x)}),p=g.reduce(function(x,y){return y?x.concat(y.data.map(function(b){return y.yAccessor(b)})):x},[]);if(p.length!==0){var m=gy(a)?p:c_(p),v=qp(a)?Zo(Rs({range:[u,c],domain:m,zero:!0},a)):Zo(Rs({range:[u,c],domain:m},a));return g.forEach(function(x){x!=null&&x.yScale&&(v=x.yScale(v))}),v}},[t,a,s,u,c]);return{xScale:d,yScale:f}}function RT(e){var t=e.initialDimensions,n=e.theme,r=e.xScale,i=e.yScale,a=e.children,s=e.horizontal,o=s===void 0?"auto":s,l=e.resizeObserverPolyfill,u=_.useContext(KU),c=n||u,d=XU(t),f=d[0],g=f.width,p=f.height,m=f.margin,v=d[1],x=Math.max(0,g-m.left-m.right),y=Math.max(0,p-m.top-m.bottom),b=GU(),k=JU({dataRegistry:b,xScaleConfig:r,yScaleConfig:i,xRange:[m.left,Math.max(0,g-m.right)],yRange:[Math.max(0,p-m.bottom),m.top]}),w=k.xScale,S=k.yScale,N=b.keys(),E=_.useMemo(function(){return FU({domain:N,range:c.colors})},[N,c.colors]),T=o==="auto"?gy(i)||i.type==="time"||i.type==="utc":o,C=_.useMemo(function(){return{dataRegistry:b,registerData:b.registerData,unregisterData:b.unregisterData,xScale:w,yScale:S,colorScale:E,theme:c,width:g,height:p,margin:m,innerWidth:x,innerHeight:y,setDimensions:v,horizontal:T,resizeObserverPolyfill:l}},[E,b,p,T,y,x,m,v,c,g,w,S,l]);return _.createElement(Or.Provider,{value:C},a)}RT.propTypes={children:V.node.isRequired,horizontal:V.oneOfType([V.bool,V.oneOf(["auto"])])};function BT(e){var t=e.source,n=e.onPointerOut,r=n===void 0?!0:n,i=e.onPointerMove,a=i===void 0?!0:i,s=e.onPointerUp,o=s===void 0?!0:s,l=e.onPointerDown,u=l===void 0?!0:l,c=e.onFocus,d=c===void 0?!1:c,f=e.onBlur,g=f===void 0?!1:f,p=Ai(),m=_.useCallback(function(w){return p==null?void 0:p("pointermove",w,t)},[p,t]),v=_.useCallback(function(w){return p==null?void 0:p("pointerout",w,t)},[p,t]),x=_.useCallback(function(w){return p==null?void 0:p("pointerup",w,t)},[p,t]),y=_.useCallback(function(w){return p==null?void 0:p("pointerdown",w,t)},[p,t]),b=_.useCallback(function(w){return p==null?void 0:p("focus",w,t)},[p,t]),k=_.useCallback(function(w){return p==null?void 0:p("blur",w,t)},[p,t]);return{onPointerMove:a?m:void 0,onFocus:d?b:void 0,onBlur:g?k:void 0,onPointerOut:r?v:void 0,onPointerUp:o?x:void 0,onPointerDown:u?y:void 0}}var ZU="GLYPHSERIES_EVENT_SOURCE",QU="LINESERIES_EVENT_SOURCE",Id="XYCHART_EVENT_SOURCE";function WT(e){return!!e&&("clientX"in e||"changedTouches"in e)}function e9(e){return!!e&&!WT(e)}function UT(e){var t=e.scale,n=e.accessor,r=e.scaledValue,i=e.data,a=t,s,o;if("invert"in a&&typeof a.invert=="function"){var l=Gu(n).left,u=Number(a.invert(r)),c=l(i,u),d=i[c-1],f=i[c];s=!d||Math.abs(u-n(d))>Math.abs(u-n(f))?f:d,o=s===d?c-1:c}else if("step"in a&&typeof a.step<"u"){var g=t.domain(),p=t.range().map(Number),m=[].concat(p).sort(function(S,N){return S-N}),v=y_(m[0],m[1],a.step()),x=bP(v,r),y=p[0]<p[1]?g:g.reverse(),b=y[x-1],k=i.findIndex(function(S){return String(n(S))===String(b)});s=i[k],o=k}else return console.warn("[visx/xychart/findNearestDatum] encountered incompatible scale type, bailing"),null;if(s==null||o==null)return null;var w=Math.abs(Number(a(n(s)))-r);return{datum:s,index:o,distance:w}}function t9(e){var t=e.xScale,n=e.xAccessor,r=e.yScale,i=e.yAccessor,a=e.point,s=e.data;if(!a)return null;var o=UT({scale:t,accessor:n,scaledValue:a.x,data:s});return o?{datum:o.datum,index:o.index,distanceX:o.distance,distanceY:Math.abs(Number(r(i(o.datum)))-a.y)}:null}function n9(e){var t=e.yScale,n=e.yAccessor,r=e.xScale,i=e.xAccessor,a=e.point,s=e.data;if(!a)return null;var o=UT({scale:t,accessor:n,scaledValue:a.y,data:s});return o?{datum:o.datum,index:o.index,distanceY:o.distance,distanceX:Math.abs(Number(r(i(o.datum)))-a.x)}:null}function my(){return my=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},my.apply(this,arguments)}var vy="__POINTER_EVENTS_ALL",Fd="__POINTER_EVENTS_NEAREST";function HT(e){var t=e.dataKey,n=e.findNearestDatum,r=e.onBlur,i=e.onFocus,a=e.onPointerMove,s=e.onPointerOut,o=e.onPointerUp,l=e.onPointerDown,u=e.allowedSources,c=_.useContext(Or),d=c.width,f=c.height,g=c.horizontal,p=c.dataRegistry,m=c.xScale,v=c.yScale,x=n||(g?n9:t9),y=_.useCallback(function(T){var C=T||{},O=C.svgPoint,$=C.event,M={},j=null,P=1/0;if(T&&$&&O&&d&&f&&m&&v){var F,B=t===Fd||t===vy,W=B?(F=p==null?void 0:p.keys())!=null?F:[]:Array.isArray(t)?t:[t];W.forEach(function(D){var A=p==null?void 0:p.get(D);if(A){var U=x({dataKey:D,data:A.data,height:f,point:O,width:d,xAccessor:A.xAccessor,xScale:m,yAccessor:A.yAccessor,yScale:v});if(U&&(M[D]=my({key:D,svgPoint:O,event:$},U),t===Fd)){var Y,G,J=Math.sqrt(((Y=U.distanceX)!=null?Y:Math.pow(1/0,2))+((G=U.distanceY)!=null?G:Math.pow(1/0,2)));j=J<P?M[D]:j,P=Math.min(P,J)}}});var q=t===Fd?[j]:t===vy||Array.isArray(t)?Object.values(M):[M[t]];return q.filter(function(D){return D})}return[]},[t,p,m,v,d,f,x]),b=_.useCallback(function(T){a&&y(T).forEach(function(C){return a(C)})},[y,a]),k=_.useCallback(function(T){o&&y(T).forEach(function(C){return o(C)})},[y,o]),w=_.useCallback(function(T){l&&y(T).forEach(function(C){return l(C)})},[y,l]),S=_.useCallback(function(T){i&&y(T).forEach(function(C){return i(C)})},[y,i]),N=_.useCallback(function(T){var C=T==null?void 0:T.event;C&&WT(C)&&s&&s(C)},[s]),E=_.useCallback(function(T){var C=T==null?void 0:T.event;C&&e9(C)&&r&&r(C)},[r]);Ai("pointermove",a?b:void 0,u),Ai("pointerout",s?N:void 0,u),Ai("pointerup",o?k:void 0,u),Ai("pointerdown",l?w:void 0,u),Ai("focus",i?S:void 0,u),Ai("blur",r?E:void 0,u)}function zd(){return zd=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zd.apply(this,arguments)}var r9={top:50,right:50,bottom:50,left:50},i9=[Id];function Bs(e){var t=e.accessibilityLabel,n=t===void 0?"XYChart":t,r=e.captureEvents,i=r===void 0?!0:r,a=e.children,s=e.height,o=e.horizontal,l=e.margin,u=l===void 0?r9:l,c=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,g=e.onPointerDown,p=e.pointerEventsDataKey,m=p===void 0?"nearest":p,v=e.theme,x=e.width,y=e.xScale,b=e.yScale,k=e.resizeObserverPolyfill,w=_.useContext(Or),S=w.setDimensions,N=w.resizeObserverPolyfill,E=_.useContext(Ul),T=Ai();_.useEffect(function(){S&&x!=null&&s!=null&&x>0&&s>0&&S({width:x,height:s,margin:u})},[S,x,s,u]);var C=BT({source:Id});return HT({dataKey:m==="nearest"?Fd:vy,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:g,allowedSources:i9}),S?x==null||s==null?_.createElement(U8,{resizeObserverPolyfill:N},function(O){return _.createElement(Bs,zd({},e,{width:e.width==null?O.width:e.width,height:e.height==null?O.height:e.height}))}):E==null?_.createElement(AT,null,_.createElement(Bs,e)):T==null?_.createElement(X8,null,_.createElement(Bs,e)):x<=0||s<=0?(process.env.NODE_ENV==="development"&&console.info("XYChart has a zero width or height, bailing",{width:x,height:s}),null):_.createElement("svg",{width:x,height:s,"aria-label":n},a,i&&_.createElement("rect",zd({x:u.left,y:u.top,width:x-u.left-u.right,height:s-u.top-u.bottom,fill:"transparent"},C))):!y||!b?(console.warn("[@visx/xychart] XYChart: When no DataProvider is available in context, you must pass xScale & yScale config to XYChart."),null):_.createElement(RT,{xScale:y,yScale:b,theme:v,initialDimensions:{width:x,height:s,margin:u},horizontal:o,resizeObserverPolyfill:k},_.createElement(Bs,e))}Bs.propTypes={accessibilityLabel:V.string,captureEvents:V.bool,width:V.number,height:V.number,children:V.node.isRequired,horizontal:V.oneOfType([V.bool,V.oneOf(["auto"])]),onPointerMove:V.func,onPointerOut:V.func,onPointerUp:V.func,onPointerDown:V.func,pointerEventsDataKey:V.oneOf(["all","nearest"])};var Ii={};const yy=Gn(jI);var xy={};xy.__esModule=!0,xy.default=a9;function a9(e,t){e(t)}var Ma={};Ma.__esModule=!0,Ma.STACK_ORDER_NAMES=Ma.STACK_ORDERS=void 0,Ma.default=o9;var Kl=yy,Rd={ascending:Kl.stackOrderAscending,descending:Kl.stackOrderDescending,insideout:Kl.stackOrderInsideOut,none:Kl.stackOrderNone,reverse:Kl.stackOrderReverse};Ma.STACK_ORDERS=Rd;var s9=Object.keys(Rd);Ma.STACK_ORDER_NAMES=s9;function o9(e){return e&&Rd[e]||Rd.none}var ja={};ja.__esModule=!0,ja.STACK_OFFSET_NAMES=ja.STACK_OFFSETS=void 0,ja.default=u9;var Yl=yy,Bd={expand:Yl.stackOffsetExpand,diverging:Yl.stackOffsetDiverging,none:Yl.stackOffsetNone,silhouette:Yl.stackOffsetSilhouette,wiggle:Yl.stackOffsetWiggle};ja.STACK_OFFSETS=Bd;var l9=Object.keys(Bd);ja.STACK_OFFSET_NAMES=l9;function u9(e){return e&&Bd[e]||Bd.none}Ii.__esModule=!0,Ii.arc=f9,Ii.area=h9,Ii.line=p9,Ii.pie=g9,Ii.radialLine=m9,Ii.stack=v9;var Ws=yy,gt=by(xy),c9=by(Ma),d9=by(ja);function by(e){return e&&e.__esModule?e:{default:e}}function f9(e){var t=e===void 0?{}:e,n=t.innerRadius,r=t.outerRadius,i=t.cornerRadius,a=t.startAngle,s=t.endAngle,o=t.padAngle,l=t.padRadius,u=(0,Ws.arc)();return n!=null&&(0,gt.default)(u.innerRadius,n),r!=null&&(0,gt.default)(u.outerRadius,r),i!=null&&(0,gt.default)(u.cornerRadius,i),a!=null&&(0,gt.default)(u.startAngle,a),s!=null&&(0,gt.default)(u.endAngle,s),o!=null&&(0,gt.default)(u.padAngle,o),l!=null&&(0,gt.default)(u.padRadius,l),u}function h9(e){var t=e===void 0?{}:e,n=t.x,r=t.x0,i=t.x1,a=t.y,s=t.y0,o=t.y1,l=t.defined,u=t.curve,c=(0,Ws.area)();return n&&(0,gt.default)(c.x,n),r&&(0,gt.default)(c.x0,r),i&&(0,gt.default)(c.x1,i),a&&(0,gt.default)(c.y,a),s&&(0,gt.default)(c.y0,s),o&&(0,gt.default)(c.y1,o),l&&c.defined(l),u&&c.curve(u),c}function p9(e){var t=e===void 0?{}:e,n=t.x,r=t.y,i=t.defined,a=t.curve,s=(0,Ws.line)();return n&&(0,gt.default)(s.x,n),r&&(0,gt.default)(s.y,r),i&&s.defined(i),a&&s.curve(a),s}function g9(e){var t=e===void 0?{}:e,n=t.startAngle,r=t.endAngle,i=t.padAngle,a=t.value,s=t.sort,o=t.sortValues,l=(0,Ws.pie)();return(s===null||s!=null)&&l.sort(s),(o===null||o!=null)&&l.sortValues(o),a!=null&&l.value(a),i!=null&&(0,gt.default)(l.padAngle,i),n!=null&&(0,gt.default)(l.startAngle,n),r!=null&&(0,gt.default)(l.endAngle,r),l}function m9(e){var t=e===void 0?{}:e,n=t.angle,r=t.radius,i=t.defined,a=t.curve,s=(0,Ws.radialLine)();return n&&(0,gt.default)(s.angle,n),r&&(0,gt.default)(s.radius,r),i&&s.defined(i),a&&s.curve(a),s}function v9(e){var t=e.keys,n=e.value,r=e.order,i=e.offset,a=(0,Ws.stack)();return t&&a.keys(t),n&&(0,gt.default)(a.value,n),r&&a.order((0,c9.default)(r)),i&&a.offset((0,d9.default)(i)),a}var y9=k9,_y=qT(_),x9=qT(Zr),b9=Ii,_9=["children","data","x","y","fill","className","curve","innerRef","defined"];function qT(e){return e&&e.__esModule?e:{default:e}}function wy(){return wy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wy.apply(this,arguments)}function w9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function k9(e){var t=e.children,n=e.data,r=n===void 0?[]:n,i=e.x,a=e.y,s=e.fill,o=s===void 0?"transparent":s,l=e.className,u=e.curve,c=e.innerRef,d=e.defined,f=d===void 0?function(){return!0}:d,g=w9(e,_9),p=(0,b9.line)({x:i,y:a,defined:f,curve:u});return t?_y.default.createElement(_y.default.Fragment,null,t({path:p})):_y.default.createElement("path",wy({ref:c,className:(0,x9.default)("visx-linepath",l),d:p(r)||"",fill:o,strokeLinecap:"round"},g))}function ky(){return ky=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ky.apply(this,arguments)}function S9(e){function t(n){var r=n.dataKey,i=n.data,a=n.xAccessor,s=n.yAccessor,o=_.useContext(Or),l=o.xScale,u=o.yScale,c=o.dataRegistry;_.useEffect(function(){return c&&c.registerData({key:r,data:i,xAccessor:a,yAccessor:s}),function(){return c==null?void 0:c.unregisterData(r)}},[c,r,i,a,s]);var d=c==null?void 0:c.get(r);if(!l||!u||!d)return null;var f=e;return _.createElement(f,ky({},n,{xScale:l,yScale:u,data:d.data,xAccessor:d.xAccessor,yAccessor:d.yAccessor}))}return t}function Wd(e,t,n){return n===void 0&&(n="center"),function(r){var i=e(t(r));if(pn(i)){var a=(n==="start"?0:Cm(e))/(n==="center"?2:1);return i+a}return NaN}}function VT(e){var t,n=e.dataKey,r=e.enableEvents,i=e.findNearestDatum,a=e.onBlur,s=e.onFocus,o=e.onPointerMove,l=e.onPointerOut,u=e.onPointerUp,c=e.onPointerDown,d=e.source,f=e.allowedSources,g=(t=_.useContext(Ul))!=null?t:{},p=g.showTooltip,m=g.hideTooltip,v=_.useCallback(function(w){p(w),o&&o(w)},[p,o]),x=_.useCallback(function(w){p(w),s&&s(w)},[p,s]),y=_.useCallback(function(w){m(),w&&l&&l(w)},[m,l]),b=_.useCallback(function(w){m(),w&&a&&a(w)},[m,a]),k=_.useCallback(function(w){p(w),c&&c(w)},[p,c]);return HT({dataKey:n,findNearestDatum:i,onBlur:r?b:void 0,onFocus:r?x:void 0,onPointerMove:r?v:void 0,onPointerOut:r?y:void 0,onPointerUp:r?u:void 0,onPointerDown:r?k:void 0,allowedSources:f}),BT({source:d,onBlur:!!a&&r,onFocus:!!s&&r,onPointerMove:!!o&&r,onPointerOut:!!l&&r,onPointerUp:!!u&&r,onPointerDown:!!c&&r})}function Sy(){return Sy=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Sy.apply(this,arguments)}function KT(e){var t,n,r,i=e.colorAccessor,a=e.data,s=e.dataKey,o=e.onBlur,l=e.onFocus,u=e.onPointerMove,c=e.onPointerOut,d=e.onPointerUp,f=e.onPointerDown,g=e.enableEvents,p=g===void 0?!0:g,m=e.renderGlyphs,v=e.size,x=v===void 0?8:v,y=e.xAccessor,b=e.xScale,k=e.yAccessor,w=e.yScale,S=_.useContext(Or),N=S.colorScale,E=S.theme,T=S.horizontal,C=_.useMemo(function(){return Wd(b,y)},[b,y]),O=_.useMemo(function(){return Wd(w,k)},[w,k]),$=(t=(n=N==null?void 0:N(s))!=null?n:E==null||(r=E.colors)==null?void 0:r[0])!=null?t:"#222",M=ZU+"-"+s,j=VT({dataKey:s,enableEvents:p,onBlur:o,onFocus:l,onPointerMove:u,onPointerOut:c,onPointerUp:d,onPointerDown:f,source:M,allowedSources:[Id,M]}),P=_.useMemo(function(){return a.map(function(F,B){var W,q=C(F);if(!pn(q))return null;var D=O(F);return pn(D)?{key:""+B,x:q,y:D,color:(W=i==null?void 0:i(F,B))!=null?W:$,size:typeof x=="function"?x(F):x,datum:F}:null}).filter(function(F){return F})},[$,i,a,C,O,x]);return _.createElement(_.Fragment,null,m(Sy({glyphs:P,xScale:b,yScale:w,horizontal:T},j)))}KT.propTypes={colorAccessor:V.func,size:V.oneOfType([V.number,V.func]),renderGlyphs:V.func.isRequired};function N9(e){var t=e.key,n=e.color,r=e.x,i=e.y,a=e.size,s=e.onBlur,o=e.onFocus,l=e.onPointerMove,u=e.onPointerOut,c=e.onPointerUp;return _.createElement("circle",{className:"visx-circle-glyph",key:t,tabIndex:s||o?0:void 0,fill:n,r:a/2,cx:r,cy:i,onBlur:s,onFocus:o,onPointerMove:l,onPointerOut:u,onPointerUp:c})}var E9=["colorAccessor","curve","data","dataKey","onBlur","onFocus","onPointerMove","onPointerOut","onPointerUp","onPointerDown","enableEvents","xAccessor","xScale","yAccessor","yScale","PathComponent"];function Gl(){return Gl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Gl.apply(this,arguments)}function T9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function YT(e){var t,n,r,i=e.colorAccessor,a=e.curve,s=e.data,o=e.dataKey,l=e.onBlur,u=e.onFocus,c=e.onPointerMove,d=e.onPointerOut,f=e.onPointerUp,g=e.onPointerDown,p=e.enableEvents,m=p===void 0?!0:p,v=e.xAccessor,x=e.xScale,y=e.yAccessor,b=e.yScale,k=e.PathComponent,w=k===void 0?"path":k,S=T9(e,E9),N=_.useContext(Or),E=N.colorScale,T=N.theme,C=_.useMemo(function(){return Wd(x,v)},[x,v]),O=_.useMemo(function(){return Wd(b,y)},[b,y]),$=_.useCallback(function(W){return pn(x(v(W)))&&pn(b(y(W)))},[x,v,b,y]),M=(t=(n=E==null?void 0:E(o))!=null?n:T==null||(r=T.colors)==null?void 0:r[0])!=null?t:"#222",j=QU+"-"+o,P=VT({dataKey:o,enableEvents:m,onBlur:l,onFocus:u,onPointerMove:c,onPointerOut:d,onPointerUp:f,onPointerDown:g,source:j,allowedSources:[Id,j]}),F=!!(u||l),B=_.useCallback(function(W){var q=W.glyphs;return F?q.map(function(D){return _.createElement(_.Fragment,{key:D.key},N9(Gl({},D,{color:"transparent",onFocus:P.onFocus,onBlur:P.onBlur})))}):null},[F,P.onFocus,P.onBlur]);return _.createElement(_.Fragment,null,_.createElement(y9,Gl({x:C,y:O,defined:$,curve:a},S),function(W){var q,D=W.path;return _.createElement(w,Gl({stroke:(q=i==null?void 0:i(o))!=null?q:M,strokeWidth:2,fill:"transparent",strokeLinecap:"round"},S,{d:D(s)||""},P))}),F&&_.createElement(KT,{dataKey:o,data:s,xAccessor:v,yAccessor:y,xScale:x,yScale:b,renderGlyphs:B}))}YT.propTypes={colorAccessor:V.func};const C9=S9(YT);function M9(e,t){const n=[],r=[];function i(a,s){if(a.length===1)n.push(a[0]),r.push(a[0]);else{const o=Array(a.length-1);for(let l=0;l<o.length;l++)l===0&&n.push(a[0]),l===o.length-1&&r.push(a[l+1]),o[l]=[(1-s)*a[l][0]+s*a[l+1][0],(1-s)*a[l][1]+s*a[l+1][1]];i(o,s)}}return e.length&&i(e,t),{left:n,right:r.reverse()}}function j9(e){const t={};return e.length===4&&(t.x2=e[2][0],t.y2=e[2][1]),e.length>=3&&(t.x1=e[1][0],t.y1=e[1][1]),t.x=e[e.length-1][0],t.y=e[e.length-1][1],e.length===4?t.type="C":e.length===3?t.type="Q":t.type="L",t}function O9(e,t){t=t||2;const n=[];let r=e;const i=1/t;for(let a=0;a<t-1;a++){const s=i/(1-i*a),o=M9(r,s);n.push(o.left),r=o.right}return n.push(r),n}function $9(e,t,n){const r=[[e.x,e.y]];return t.x1!=null&&r.push([t.x1,t.y1]),t.x2!=null&&r.push([t.x2,t.y2]),r.push([t.x,t.y]),O9(r,n).map(j9)}const P9=/[MLCSTQAHVZmlcstqahv]|-?[\d.e+-]+/g,Us={M:["x","y"],L:["x","y"],H:["x"],V:["y"],C:["x1","y1","x2","y2","x","y"],S:["x2","y2","x","y"],Q:["x1","y1","x","y"],T:["x","y"],A:["rx","ry","xAxisRotation","largeArcFlag","sweepFlag","x","y"],Z:[]};Object.keys(Us).forEach(e=>{Us[e.toLowerCase()]=Us[e]});function Ny(e,t){const n=Array(e);for(let r=0;r<e;r++)n[r]=t;return n}function A9(e){return`${e.type}${Us[e.type].map(t=>e[t]).join(",")}`}function L9(e,t){const n={x1:"x",y1:"y",x2:"x",y2:"y"},r=["xAxisRotation","largeArcFlag","sweepFlag"];if(e.type!==t.type&&t.type.toUpperCase()!=="M"){const i={};Object.keys(t).forEach(a=>{const s=t[a];let o=e[a];o===void 0&&(r.includes(a)?o=s:(o===void 0&&n[a]&&(o=e[n[a]]),o===void 0&&(o=0))),i[a]=o}),i.type=t.type,e=i}return e}function D9(e,t,n){let r=[];if(t.type==="L"||t.type==="Q"||t.type==="C")r=r.concat($9(e,t,n));else{const i=Object.assign({},e);i.type==="M"&&(i.type="L"),r=r.concat(Ny(n-1).map(()=>i)),r.push(t)}return r}function GT(e,t,n){const r=e.length-1,i=t.length-1,a=r/i,o=Ny(i).reduce((l,u,c)=>{let d=Math.floor(a*c);return l[d]=(l[d]||0)+1,l},[]).reduce((l,u,c)=>{if(c===e.length-1){const d=Ny(u,Object.assign({},e[e.length-1]));return d[0].type==="M"&&d.forEach(f=>{f.type="L"}),l.concat(d)}return l.concat(D9(e[c],e[c+1],u))},[]);return o.unshift(e[0]),o}function XT(e){const t=(e||"").match(P9)||[],n=[];let r,i;for(let a=0;a<t.length;++a)if(r=Us[t[a]],r){i={type:t[a]};for(let s=0;s<r.length;++s)i[r[s]]=+t[a+s+1];a+=r.length,n.push(i)}return n}function I9(e,t,n){let r=e==null?[]:e.slice(),i=t==null?[]:t.slice();if(!r.length&&!i.length)return function(){return[]};const a=(r.length===0||r[r.length-1].type==="Z")&&(i.length===0||i[i.length-1].type==="Z");r.length>0&&r[r.length-1].type==="Z"&&r.pop(),i.length>0&&i[i.length-1].type==="Z"&&i.pop(),r.length?i.length||i.push(r[0]):r.push(i[0]),Math.abs(i.length-r.length)!==0&&(i.length>r.length?r=GT(r,i):i.length<r.length&&(i=GT(i,r))),r=r.map((l,u)=>L9(l,i[u]));const o=r.map(l=>({...l}));return a&&o.push({type:"Z"}),function(u){if(u===1)return t??[];if(u>0)for(let c=0;c<o.length;++c){const d=r[c],f=i[c],g=o[c];for(const p of Us[g.type])g[p]=(1-u)*d[p]+u*f[p],(p==="largeArcFlag"||p==="sweepFlag")&&(g[p]=Math.round(g[p]))}return o}}function F9(e,t,n){let r=XT(e),i=XT(t);if(!r.length&&!i.length)return function(){return""};const a=I9(r,i);return function(o){if(o===1)return t??"";const l=a(o);let u="";for(const c of l)u+=A9(c);return u}}var z9=["d","stroke","fill"];function Ey(){return Ey=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ey.apply(this,arguments)}function R9(e,t){if(e==null)return{};var n={},r=Object.keys(e),i,a;for(a=0;a<r.length;a++)i=r[a],!(t.indexOf(i)>=0)&&(n[i]=e[i]);return n}function B9(e){var t=e.d,n=e.stroke,r=n===void 0?"transparent":n,i=e.fill,a=i===void 0?"transparent":i,s=R9(e,z9),o=_.useRef(t),l=_.useCallback(CT(function(g){o.current=g},50),[]),u=F9(o.current,t);l(t);var c=Ca({from:{t:0},to:{t:1},reset:!0,delay:0}),d=c.t,f=Ca({stroke:r,fill:a});return _.createElement(fv.path,Ey({className:"visx-path",d:d.to(u),stroke:f.stroke,fill:f.fill},s))}const W9=_.memo(B9);function Ty(){return Ty=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ty.apply(this,arguments)}function U9(e){return _.createElement(C9,Ty({},e,{PathComponent:W9}))}const JT=["var(--color-dataviz-1)","var(--color-dataviz-2)","var(--color-dataviz-3)","var(--color-dataviz-4)","var(--color-dataviz-5)","var(--color-dataviz-6)","var(--color-dataviz-7)","var(--color-dataviz-8)"],Hs="var(--color-dataviz-grid)",Je="var(--color-dataviz-axis)",Cn="var(--color-dataviz-label)",Bt=640,Ce={top:12,right:16,bottom:36,left:44};function Ar(e,t){return t||JT[e%JT.length]}function ln(e,t){const n=e[t];return n==null?"":String(n)}function Wt(e,t){const n=e[t];if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"){const r=Number(n);return Number.isFinite(r)?r:0}return 0}function oi({state:e,emptyMessage:t,errorMessage:n,loadingLabel:r}){return e==="loading"?h.jsx("div",{className:"dsn-chart-state",role:"status","aria-live":"polite",children:r}):e==="error"?h.jsx("div",{className:"dsn-chart-state",role:"alert",children:n}):h.jsx("div",{className:"dsn-chart-state",children:t})}function H9({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="Line chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-Ce.top-Ce.bottom,g=Bt-Ce.left-Ce.right,p=e.map(y=>ln(y,t)),m=Math.max(1,...e.flatMap(y=>n.map(b=>Wt(y,b.key)))),v=lr({domain:p,range:[0,g],padding:.28}),x=In({domain:[0,m],range:[f,0],nice:!0});return h.jsx("div",{className:c,role:"img","aria-label":u,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${r}`,"aria-hidden":"true",children:h.jsxs(ct,{left:Ce.left,top:Ce.top,children:[x.ticks(4).map(y=>{const b=x(y);return h.jsx("line",{x1:0,x2:g,y1:b,y2:b,stroke:Hs,strokeDasharray:"3 3"},`line-grid-${y}`)}),n.map((y,b)=>{const k=Ar(b,y.color),w=e.map(S=>({x:(v(ln(S,t))??0)+v.bandwidth()/2,y:x(Wt(S,y.key))}));return h.jsxs("g",{children:[h.jsx(Ss,{data:w,x:S=>S.x,y:S=>S.y,stroke:k,strokeWidth:2}),w.map((S,N)=>h.jsx("circle",{cx:S.x,cy:S.y,r:3,fill:"var(--background-primary)",stroke:k,strokeWidth:1.5},`${y.key}-${N}`))]},y.key)}),h.jsx(Na,{top:f,scale:v,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(ol,{scale:x,numTicks:4,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function q9({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="Bar chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-Ce.top-Ce.bottom,g=Bt-Ce.left-Ce.right,p=e.map(k=>ln(k,t)),m=n.map(k=>k.key),v=Math.max(1,...e.flatMap(k=>n.map(w=>Wt(k,w.key)))),x=lr({domain:p,range:[0,g],padding:.2}),y=lr({domain:m,range:[0,x.bandwidth()],padding:.12}),b=In({domain:[0,v],range:[f,0],nice:!0});return h.jsx("div",{className:c,role:"img","aria-label":u,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${r}`,"aria-hidden":"true",children:h.jsxs(ct,{left:Ce.left,top:Ce.top,children:[b.ticks(4).map(k=>{const w=b(k);return h.jsx("line",{x1:0,x2:g,y1:w,y2:w,stroke:Hs,strokeDasharray:"3 3"},`bar-grid-${k}`)}),e.map(k=>{const w=ln(k,t),S=x(w)??0;return n.map((N,E)=>{const T=Wt(k,N.key),C=S+(y(N.key)??0),O=b(T),$=y.bandwidth(),M=f-O;return h.jsx(Ei,{x:C,y:O,width:$,height:Math.max(0,M),fill:Ar(E,N.color),rx:4},`${w}-${N.key}`)})}),h.jsx(Na,{top:f,scale:x,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(ol,{scale:b,numTicks:4,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function V9({data:e,height:t=240,innerRadius:n=56,outerRadius:r=84,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="Donut chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0,f=Math.min(r,t/2-16,Bt/2-16),g=Math.min(n,f-8),p=Hp({domain:e.map(m=>m.id),range:e.map((m,v)=>Ar(v,m.color))});return h.jsxs("div",{className:c,role:"img","aria-label":u,children:[h.jsx("div",{className:"dsn-chart-surface",style:{height:`${t}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${t}`,"aria-hidden":"true",children:h.jsx(ct,{top:t/2,left:Bt/2,children:h.jsx(OS,{data:e,pieValue:m=>m.value,outerRadius:f,innerRadius:g,padAngle:.01,children:m=>m.arcs.map(v=>h.jsx("path",{d:m.path(v)??"",fill:p(v.data.id),stroke:"var(--background-primary)",strokeWidth:2},`donut-${v.data.id}`))})})})}),d?null:h.jsx("ul",{className:"dsn-chart-legend","aria-label":"Chart legend",children:e.map((m,v)=>h.jsxs("li",{className:"dsn-chart-legend-item",children:[h.jsx("span",{className:"dsn-chart-legend-swatch",style:{background:Ar(v,m.color)},"aria-hidden":"true"}),h.jsx("span",{className:"dsn-chart-legend-label",children:m.label})]},m.id))})]})}function K9({data:e,xKey:t,series:n,height:r=240,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="Area chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-Ce.top-Ce.bottom,g=Bt-Ce.left-Ce.right,p=e.map(y=>ln(y,t)),m=Math.max(1,...e.flatMap(y=>n.map(b=>Wt(y,b.key)))),v=lr({domain:p,range:[0,g],padding:.2}),x=In({domain:[0,m],range:[f,0],nice:!0});return h.jsx("div",{className:c,role:"img","aria-label":u,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${r}`,"aria-hidden":"true",children:h.jsxs(ct,{left:Ce.left,top:Ce.top,children:[x.ticks(4).map(y=>h.jsx("line",{x1:0,x2:g,y1:x(y),y2:x(y),stroke:Hs,strokeDasharray:"3 3"},`area-grid-${y}`)),n.map((y,b)=>{const k=Ar(b,y.color),w=e.map(S=>({x:(v(ln(S,t))??0)+v.bandwidth()/2,y:Wt(S,y.key)}));return h.jsxs("g",{children:[h.jsx(wg,{data:w,x:S=>S.x,y:S=>x(S.y),yScale:x,stroke:k,fill:k,fillOpacity:.2,strokeWidth:2}),h.jsx(Ss,{data:w,x:S=>S.x,y:S=>x(S.y),stroke:k,strokeWidth:2})]},y.key)}),h.jsx(Na,{top:f,scale:v,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(ol,{scale:x,numTicks:4,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function Y9({data:e,categoryKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="Horizontal stacked bar chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-Ce.top-Ce.bottom,g=Bt-Ce.left-Ce.right,p=e.map(y=>ln(y,t)),m=Math.max(1,...e.map(y=>n.reduce((b,k)=>b+Wt(y,k.key),0))),v=lr({domain:p,range:[0,f],padding:.22}),x=In({domain:[0,m],range:[0,g],nice:!0});return h.jsx("div",{className:c,role:"img","aria-label":u,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${r}`,"aria-hidden":"true",children:h.jsxs(ct,{left:Ce.left,top:Ce.top,children:[x.ticks(4).map(y=>h.jsx("line",{x1:x(y),x2:x(y),y1:0,y2:f,stroke:Hs,strokeDasharray:"3 3"},`hstack-grid-${y}`)),e.map(y=>{const b=ln(y,t),k=v(b)??0,w=v.bandwidth();let S=0;return n.map((N,E)=>{const T=Wt(y,N.key),C=x(S),O=Math.max(0,x(S+T)-C);return S+=T,h.jsx(Ei,{x:C,y:k,width:O,height:w,fill:Ar(E,N.color)},`${b}-${N.key}`)})}),h.jsx(Na,{top:f,scale:x,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(ol,{scale:v,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function G9({data:e,xKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="Streamgraph chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-Ce.top-Ce.bottom,g=Bt-Ce.left-Ce.right,p=e.map(b=>ln(b,t)),m=e.map(b=>n.reduce((k,w)=>k+Wt(b,w.key),0)),v=Math.max(1,...m.map(b=>b/2)),x=lr({domain:p,range:[0,g],padding:.05}),y=In({domain:[-v,v],range:[f,0],nice:!0});return h.jsx("div",{className:c,role:"img","aria-label":u,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${r}`,"aria-hidden":"true",children:h.jsxs(ct,{left:Ce.left,top:Ce.top,children:[n.map((b,k)=>{const w=e.map(S=>{const E=-n.reduce((C,O)=>C+Wt(S,O.key),0)/2+n.slice(0,k).reduce((C,O)=>C+Wt(S,O.key),0),T=E+Wt(S,b.key);return{x:(x(ln(S,t))??0)+x.bandwidth()/2,y0:E,y1:T}});return h.jsx(wg,{data:w,x:S=>S.x,y0:S=>y(S.y0),y1:S=>y(S.y1),fill:Ar(k,b.color),fillOpacity:.8,stroke:"none"},`stream-layer-${b.key}`)}),h.jsx(Na,{top:f,scale:x,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"middle",dy:"0.8em"})})]})})})})}function X9({data:e,xKey:t,series:n,height:r=300,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="Brush line chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0,f=r-76,g=52,p=f-Ce.top-Ce.bottom,m=Bt-Ce.left-Ce.right,v=e.map(C=>ln(C,t)),[x,y]=_.useState(null),b=Math.max(1,...e.flatMap(C=>n.map(O=>Wt(C,O.key)))),k=C=>Math.max(0,Math.min(v.length-1,Math.floor(C/Math.max(m,1)*v.length))),w=x==null?e:e.slice(Math.min(x.start,x.end),Math.max(x.start,x.end)+1),S=w.map(C=>ln(C,t)),N=lr({domain:S,range:[0,m],padding:.28}),E=In({domain:[0,b],range:[p,0],nice:!0}),T=In({domain:[0,Math.max(v.length-1,1)],range:[0,m]});return h.jsx("div",{className:c,role:"img","aria-label":u,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsxs("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${r}`,"aria-hidden":"true",children:[h.jsxs(ct,{left:Ce.left,top:Ce.top,children:[n.map((C,O)=>{const $=Ar(O,C.color),M=w.map(j=>({x:(N(ln(j,t))??0)+N.bandwidth()/2,y:E(Wt(j,C.key))}));return h.jsx(Ss,{data:M,x:j=>j.x,y:j=>j.y,stroke:$,strokeWidth:2},`brush-main-${C.key}`)}),h.jsx(Na,{top:p,scale:N,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"middle",dy:"0.8em"})})]}),h.jsxs(ct,{left:Ce.left,top:f+8,children:[h.jsx("line",{x1:0,x2:m,y1:g,y2:g,stroke:Hs}),n.slice(0,1).map((C,O)=>{const $=Ar(O,C.color),M=e.map((j,P)=>({x:T(P),y:g-Wt(j,C.key)/b*g}));return h.jsx(Ss,{data:M,x:j=>j.x,y:j=>j.y,stroke:$,strokeWidth:1.5},`brush-preview-${C.key}`)}),h.jsx(Em,{xScale:T,yScale:In({domain:[0,1],range:[g,0]}),width:m,height:g,margin:{top:0,left:0,right:0,bottom:0},handleSize:8,resizeTriggerAreas:["left","right"],onChange:C=>{const O=C;if(!O||O.x0==null||O.x1==null){y(null);return}y({start:k(O.x0),end:k(O.x1)})},selectedBoxStyle:{fill:"var(--color-dataviz-1)",fillOpacity:.2,stroke:"var(--color-dataviz-1)"}})]})]})})})}function J9({data:e,xKey:t,series:n,height:r=260,state:i="default",emptyMessage:a="No data available.",errorMessage:s="Unable to load chart data.",loadingLabel:o="Loading chart data...",className:l,"aria-label":u="XY line chart"}){const c=["dsn-chart",l].filter(Boolean).join(" "),d=i!=="default"||e.length===0||n.length===0;return h.jsx("div",{className:c,role:"img","aria-label":u,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${r}px`},children:d?h.jsx(oi,{state:i==="default"?"empty":i,emptyMessage:a,errorMessage:s,loadingLabel:o}):h.jsxs(Bs,{height:r,xScale:{type:"band"},yScale:{type:"linear"},children:[h.jsx(WW,{columns:!1,numTicks:4,stroke:Hs}),h.jsx(ZE,{orientation:"bottom",stroke:Je,tickStroke:Je}),h.jsx(ZE,{orientation:"left",stroke:Je,tickStroke:Je}),n.map((f,g)=>h.jsx(U9,{dataKey:f.label,data:e,xAccessor:p=>ln(p,t),yAccessor:p=>Wt(p,f.key),stroke:Ar(g,f.color)},f.key)),h.jsx(kT,{showVerticalCrosshair:!0,showSeriesGlyphs:!0,renderTooltip:({tooltipData:f})=>{var p;const g=(p=f==null?void 0:f.nearestDatum)==null?void 0:p.datum;return g?h.jsxs("div",{children:[ln(g,t)," - ",n.map(m=>`${m.label}: ${Wt(g,m.key)}`).join(" | ")]}):null},style:{background:"var(--color-dataviz-tooltip-bg)",border:"1px solid var(--color-dataviz-tooltip-border)",color:Cn}})]})})})}function Z9({data:e,height:t=280,state:n="default",emptyMessage:r="No data available.",errorMessage:i="Unable to load chart data.",loadingLabel:a="Loading chart data...",className:s,"aria-label":o="Heatmap chart"}){var y;const l=["dsn-chart",s].filter(Boolean).join(" "),u=((y=e[0])==null?void 0:y.bins.map(b=>b.y))??[],c=n!=="default"||e.length===0||u.length===0,d=t-Ce.top-Ce.bottom,f=Bt-Ce.left-Ce.right,g=e.map(b=>b.x),p=Math.max(1,...e.flatMap(b=>b.bins.map(k=>k.value))),m=lr({domain:g,range:[0,f],padding:.08}),v=lr({domain:u,range:[0,d],padding:.08}),x=In({domain:[0,p],range:["var(--color-dataviz-grid)","var(--color-dataviz-1)"]});return h.jsx("div",{className:l,role:"img","aria-label":o,children:h.jsx("div",{className:"dsn-chart-surface",style:{height:`${t}px`},children:c?h.jsx(oi,{state:n==="default"?"empty":n,emptyMessage:r,errorMessage:i,loadingLabel:a}):h.jsx("svg",{width:"100%",height:"100%",viewBox:`0 0 ${Bt} ${t}`,"aria-hidden":"true",children:h.jsxs(ct,{left:Ce.left,top:Ce.top,children:[h.jsx(DN,{data:e,xScale:b=>m(g[b])??0,yScale:b=>v(u[b])??0,binWidth:m.bandwidth(),binHeight:v.bandwidth(),colorScale:b=>x(Number(b)),bins:b=>b.bins,count:b=>b.value,gap:2}),h.jsx(Na,{top:d,scale:m,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"middle",dy:"0.8em"})}),h.jsx(ol,{scale:v,stroke:Je,tickStroke:Je,tickLabelProps:()=>({fill:Cn,fontSize:12,textAnchor:"end",dx:"-0.3em",dy:"0.25em"})})]})})})})}function Q9({children:e,className:t,...n}){const r=["dsn-chart-card",t].filter(Boolean).join(" ");return h.jsx(G1,{...n,className:r,children:h.jsx("div",{className:"dsn-chart-card-content",children:e})})}const e7=[{id:"root",label:"Title"},{id:"group",label:"..."},{id:"parent",label:"Title"},{id:"current",label:"Title",variant:"current"}];function t7(){return h.jsxs(Fi,{size:"md",spaceBetween:!0,"aria-label":"Navigation controls",children:[h.jsx(we,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(Py,{size:16,"aria-hidden":"true"}),"aria-label":"Back"}),h.jsx(we,{variant:"ghost",size:"md",showLabel:!1,showLeadingIcon:!0,leadingIcon:h.jsx(dC,{size:16,"aria-hidden":"true"}),"aria-label":"Forward"})]})}function n7(e,t){const n=e.find(i=>i.variant==="current");if((n==null?void 0:n.label)!=null)return n.label;const r=e[e.length-1];return(r==null?void 0:r.label)!=null?r.label:t}function r7({variant:e="title",title:t="Title",description:n,showDescription:r=!1,descriptionIcon:i,leftActions:a,rightActions:s,breadcrumbItems:o=e7,breadcrumbMaxVisibleItems:l=4,breadcrumbShowEllipsis:u=!0,responsiveCollapse:c=!0,backOnlyBreakpointPx:d=640,backLabel:f="Back",onBackClick:g,className:p,"aria-label":m="Navbar"}){const v=_.useCallback(()=>typeof window<"u"?window.innerWidth:Number.POSITIVE_INFINITY,[]),[x,y]=_.useState(v);_.useEffect(()=>{if(typeof window>"u")return;const E=()=>y(window.innerWidth);return window.addEventListener("resize",E),()=>window.removeEventListener("resize",E)},[]);const b=e==="breadcrumbs"&&c&&x<=d,k=_.useMemo(()=>!c||e!=="breadcrumbs"?l:x<=d?1:x<=768?Math.min(l,3):x<=1024?Math.min(l,4):Math.min(l,5),[d,l,c,e,x]),w=["dsn-navbar",p].filter(Boolean).join(" "),S=a??h.jsx(t7,{}),N=n7(o,t);return h.jsxs("header",{className:w,"data-variant":e,"data-back-only":b||void 0,"aria-label":m,children:[h.jsx("div",{className:"dsn-navbar-left",children:b?h.jsx(we,{variant:"ghost",size:"md",showLeadingIcon:!0,leadingIcon:h.jsx(Py,{size:16,"aria-hidden":"true"}),showLabel:!1,"aria-label":f,onClick:g}):S}),h.jsx("div",{className:"dsn-navbar-center",children:e==="breadcrumbs"?b?h.jsx("div",{className:"dsn-navbar-title-row",children:h.jsx("h1",{className:"dsn-navbar-title",children:N})}):h.jsx(n0,{items:o,maxVisibleItems:k,showEllipsis:u,"aria-label":"Page breadcrumb"}):h.jsxs("div",{className:"dsn-navbar-title-stack",children:[h.jsx("div",{className:"dsn-navbar-title-row",children:h.jsx("h1",{className:"dsn-navbar-title",children:t})}),r&&n?h.jsxs("div",{className:"dsn-navbar-description-row",children:[i?h.jsx("span",{className:"dsn-navbar-description-icon","aria-hidden":"true",children:i}):null,h.jsx("p",{className:"dsn-navbar-description",children:n})]}):null]})}),h.jsx("div",{className:"dsn-navbar-right",children:s})]})}function i7({collapsed:e=!1,selector:t,selectorProps:n,showSearch:r=!1,searchSlot:i,sections:a,bottomContent:s,className:o,"aria-label":l="Sidebar"}){const u=_.useId(),[c,d]=_.useState(()=>Object.fromEntries(a.map(p=>[p.id,!0])));_.useEffect(()=>{d(p=>{const m={};for(const v of a)m[v.id]=p[v.id]??!0;return m})},[a]);const f=["dsn-sidebar",o].filter(Boolean).join(" "),g=t??h.jsx(lf,{variant:e?"icon":"full",label:"Workspace",showAvatar:!0,avatarProps:{size:"xs",variant:"organization",fill:"initials",initials:"WS",name:"Workspace"},showDisclosure:!e,...n});return h.jsxs("aside",{className:f,"data-collapsed":e||void 0,"aria-label":l,children:[h.jsxs("div",{className:"dsn-sidebar-header",children:[h.jsx("div",{className:"dsn-sidebar-selector-slot",children:g}),r&&i&&h.jsx("div",{className:"dsn-sidebar-search",children:i})]}),h.jsx("nav",{className:"dsn-sidebar-nav","aria-label":"Sidebar menu",children:a.map(p=>{const m=!!(!e&&p.title&&p.showDisclosure),v=m?c[p.id]??!0:!0,x=`${u}-${p.id}-items`;return h.jsxs(_.Fragment,{children:[(p.separator==="before"||p.separator==="both")&&h.jsx(Zd,{decorative:!0,className:"dsn-sidebar-separator"}),h.jsxs("section",{className:"dsn-sidebar-section","aria-label":p.title??`Section ${p.id}`,children:[p.title&&!e&&h.jsx(Rr,{title:p.title,size:"xsmall",leadingControl:m?h.jsx("button",{type:"button",className:"dsn-sidebar-section-disclosure","data-expanded":v||void 0,"aria-label":v?`Collapse ${p.title}`:`Expand ${p.title}`,"aria-expanded":v,"aria-controls":x,onClick:()=>{d(y=>({...y,[p.id]:!v}))},children:h.jsx(Aa,{size:16,"aria-hidden":!0})}):p.showDisclosure?h.jsx(Aa,{size:16,"aria-hidden":!0}):void 0,trailingControl:p.trailingAction,className:"dsn-sidebar-section-header"}),v&&h.jsx("div",{className:"dsn-sidebar-section-items",id:x,children:p.items.map(y=>h.jsx(lf,{variant:e?"icon":"full",label:y.label,showIcon:!y.showAvatar&&!!y.icon,icon:y.icon,showAvatar:y.showAvatar,avatarProps:y.avatarProps,showBadge:y.showBadge,badgeCount:y.badgeCount,badgeVariant:y.badgeVariant,selected:y.selected,disabled:y.disabled,onClick:y.onClick},y.id))})]}),(p.separator==="after"||p.separator==="both")&&h.jsx(Zd,{decorative:!0,className:"dsn-sidebar-separator"})]},p.id)})}),s&&h.jsx("div",{className:"dsn-sidebar-bottom",children:s})]})}le.Accordion=yj,le.AlertDialog=iP,le.AreaChart=K9,le.AttachmentCard=GC,le.AttachmentChip=Gd,le.AttachmentField=KC,le.Avatar=Ri,le.AvatarGroup=RC,le.Badge=Ys,le.BarChart=q9,le.Breadcrumbs=wj,le.BreadcrumbsController=n0,le.BrushLineChart=X9,le.Button=we,le.ButtonGroup=Fi,le.ButtonGroupVertical=aC,le.Callout=vj,le.Card=G1,le.ChartCard=Q9,le.Checkbox=Xn,le.CheckboxField=nj,le.Chip=Gs,le.ChipField=cj,le.ChipGroup=Xl,le.ChoiceList=e0,le.Combobox=Ky,le.CustomViewTab=Gy,le.CustomViewTabs=HM,le.DataListCell=ej,le.DataTable=aP,le.DataTableCell=Zy,le.DataTableHeaderCell=Xy,le.DateTimePicker=FM,le.DonutChart=V9,le.Drawer=rP,le.EmptyState=Nj,le.FileRow=JC,le.FileThumbnail=Yd,le.HeatmapChart=Z9,le.HorizontalInput=ij,le.HorizontalStackedBarChart=Y9,le.LineChart=H9,le.LoadingBar=ZC,le.MenuCell=Bi,le.Modal=tP,le.MultiChoice=sj,le.Navbar=r7,le.NumberInput=Wi,le.OTPInput=dM,le.PageSelector=t0,le.Pagination=bj,le.PasswordInput=oM,le.PasswordRequirement=cM,le.PhoneInput=hM,le.PopoverMenu=eP,le.PopoverWrapper=Fr,le.ProgressBar=Hy,le.ProgressRing=Wy,le.Radio=Qd,le.RichTextEditor=J2,le.SearchBar=Vy,le.SectionHeader=Rr,le.SegmentControl=tf,le.Select=_M,le.Separator=Zd,le.Shortcut=qd,le.Sidebar=i7,le.SidebarMenuSelector=lf,le.SingleChoice=lj,le.SkeletonLoading=QC,le.Slider=dj,le.SplitButton=zC,le.Stat=BC,le.StreamgraphChart=G9,le.Switcher=La,le.Tab=WM,le.Tag=Ir,le.TextArea=gM,le.TextInput=tM,le.Toast=gj,le.ToggleButton=cn,le.Toolbar=Da,le.Tooltip=Jd,le.UploadArea=RM,le.VerticalButton=iC,le.XYLineChart=J9,Object.defineProperty(le,Symbol.toStringTag,{value:"Module"})});